x,y = map(int,input().split()) z = [(-2,-1),(-2,1),(-1,-2),(-1,2),(2,1),(2,-1),(1,2),(1,-2)] res = "NO" if abs(x) > 6 or abs(y) > 6 : res = "NO" else : for i in range(len(z)) : if res == "YES" : break m1,n1 = z[i] if m1 == x and n1 == y : res = "YES" break for j in range(len(z)) : if res == "YES" : break m2,n2 = z[j] ma = m1 + m2 na = n1 + n2 if ma == x and na == y : res = "YES" break for k in range(len(z)) : m3,n3 = z[k] mb = ma + m3 nb = na + n3 if mb == x and nb == y : res = "YES" break print(res)