import sequtils, strutils, algorithm, math, future, sets, tables, hashes
proc `ceilDiv`*[T](x, y: T): T = x div y + ord(x mod y != 0)
proc `//=`*(x: var SomeInteger; y: SomeInteger) = x = x div y
proc `%=`*(x: var SomeInteger; y: SomeInteger) = x = x mod y

var 
    S = stdin.readLine.split.map(parseInt)
if sum(S) mod 3 == 0:
    echo "Yes"
else:
    echo "No"