Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int main()
- {
- int a,b,c,d;
- while(cin>>a>>b>>c)
- {
- if(a>b)
- {
- d=a;
- a=b;
- b=d;
- }
- if(a>c)
- {
- d=a;
- a=c;
- c=d;
- }
- if(b>c)
- {
- d=b;
- b=c;
- c=d;
- }
- if(a>3)
- {
- cout<<"NO"<<endl;
- continue;
- }
- if(a==3)
- {
- if(b==3&&c==3)
- {
- cout<<"YES"<<endl;
- }
- else cout<<"NO"<<endl;
- continue;
- }
- if(a==2)
- {
- if(b==2)
- cout<<"YES"<<endl;
- else if(b==4&&c==4)
- cout<<"YES"<<endl;
- else cout<<"NO"<<endl;
- continue;
- }
- if(a==1)
- {
- cout<<"YES"<<endl;
- continue;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement