import numpy;print("Yes"if 0in numpy.array(list(map(int,input().split())))%3else"No")