#coding: utf-8
# Média Final
# (C) 2016, Yovany Cunha/UFCG, Programaçao I


num1 = int(raw_input())
num2 = int(raw_input())
soma = num1 + num2

if num1 == 10 or num2 == 10 or soma == 10:
	print 'SIM'
else:
	print 'NAO'
