X,Y,Z=map(int,input().split()) print(["YES","NO"][X*Y*Z%3>0])