#define _USE_MATH_DEFINES

#include <iostream>		//cin, cout
#include <vector>		//vector
#include <algorithm>	//sort,min,max,count
#include <string>		//string,getline, to_string
#include <cstdlib>		//abs(int)
#include <utility>		//swap, pair
#include <deque>		//deque
#include <climits>		//INT_MAX
#include <bitset>		//bitset
#include <cmath>		//sqrt, ceil. M_PI, pow, sin
#include <ios>			//fixed
#include <iomanip>		//setprecision
#include <sstream>		//stringstream
#include <numeric>		//gcd, assumlate
#include <random>		//randam_device
#include <limits>		//numeric_limits

using namespace std;
constexpr long long int D_MOD = 1000000007;


int main() {

    int X, Y, Z;
    cin >> X >> Y >> Z;

    if (X % 3 == 0) {
        cout << "Yes" << endl;
    }
    else if (Y % 3 == 0) {
        cout << "Yes" << endl;
    }
    else if (Z % 3 == 0) {
        cout << "Yes" << endl;
    }
    else {
        cout << "No" << endl;
    }

    return 0;

}