fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int ux,uy,vx,vy,S;
  7. cin >>S >> ux >> uy >>vx >>vy;
  8. long long int s1,s2;
  9. s1=(2*ux*uy)/10;
  10. s2=(2*vx*vy)/10;
  11. if(s1+s2>=S)
  12. cout << "YES" << endl;
  13. else
  14. cout << "NO" << endl;
  15. return 0;
  16. }
Success #stdin #stdout 0s 4404KB
stdin
10 5 5 5 5
stdout
YES