print("YNeos"[eval(input().replace(" ","*"))%3<1::2])