x,y = map(int,input().split()) z = [(0,0),(0,1),(0,2),(0,3),(1,0),(1,1),(1,2),(2,0),(2,1),(3,0)] res = "NO" if abs(x) > 6 or abs(y) > 6 : res = "NO" else : for i in range(len(z)) : m,n = z[i] if 2*m + n == abs(x) and m + 2*n == abs(y): res = "YES" break print(res)