def d a;eval gets.split.*a;end puts d(?*)==d(?+)?:YES: :NO