<?php
//    $test = "100 22 30";
    $input = explode(" ", trim(fgets(STDIN)));
//    $input = explode(" ", $test);
    $num = 0;
    foreach ($input as $value) {
        $num += $value;
    }
//    echo $num;
    if($num%3 == 0){
        echo "Yes";
    } else {
        echo "No";
    }
?>
