Detectives arrest three, confiscate $24,000 in illegal prescription pills