changed are_isomers() function to handle list with single product