Fiz um input para colocar o nome dos produtos dinamicamente também
A = input('Name of the product 1: ')
B = input('Name of the product 2: ')
productA = int(input(f'Quantity of {A} sold: '))
productB = int(input(f'Quantity of {B} sold: '))
if productA > productB:
print(f'{A} had more sales')
elif productB > productA:
print(f'{B} had more sales')
else:
print('Both products sold the same!')