x,y,z = map(int,input().split()) if x % 3 == 0: print("Yes") exit() if y % 3 == 0: print("Yes") exit() if z % 3 == 0: print("Yes") exit() print("No")