#include<bits/stdc++.h>
using namespace std;
int main(){
int c,s,a,b,c;
cin>>c>>s>>a>>b>>c;
c=a+b+c;
if(c<=20){
cout<<"YES"<<endl;
}
else{
cout<<"NO"<<endl;
}
}
/**************************************************************
Problem: 1634
User: yangjunwen
Language: C++
Result: Compile Error
****************************************************************/