p=[int(s)%3 for s in input().split()] print('Yes' if 0 in p else 'No')