# coding: utf-8
# 10 ou soma 10
# (c) Héricles Emanuel, UFCG, Programação 1

num_1 = int(raw_input())
num_2 = int(raw_input())

if num_1 == 10 or num_2 == 10 or num_1 + num_2 == 10:
	print "SIM"
else:
	print "NAO"