X, Y, Z = map(int, input().split(' ')) for n in [X, Y, Z]: if n % 3 == 0: print('Yes') exit() print('No')