a, b, c = io.read("*n", "*n", "*n") a = a * 1LL b = b * 1LL c = c * 1LL a = (a * b) % 3LL a = (a * c) % 3LL print(a == 0LL and "Yes" or "No")