#include <iostream>

using namespace std;

int main()
{
    int a, b, c;
    
    while(cin >> a >> b >> c)
    {
        cout << (a + b + (55 - a - b - c) / 7 <= 20 ? "YES" : "NO") << endl;
    }
    
    return 0;
}