#include<iostream>
using namespace std;
int main(){
    int a, b, c, conta = 0, contb = 0, contc = 0;
    cin >> a >> b >> c;
    if(a == 5) conta++;
    else contb++;
    if(b == 5) conta++;
    else contb++;
    if(c == 5) conta++;
    else contb++;
    if(conta == 2 && contb == 1) cout << "YES\n";
    else cout << "NO\n";
    return 0;
}