Advertisement
Saleh127

CF 1388A

Jul 30th, 2020
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. ios_base::sync_with_stdio(0);
  6. cin.tie(0);cout.tie(0);
  7.  
  8. int t;
  9. cin>>t;
  10. while(t--)
  11. {
  12. int a,c,d,e,f;
  13. cin>>a;
  14. if(a<=30) cout<<"NO"<<endl;
  15. else
  16. {
  17. cout<<"YES"<<endl;
  18. d=a-30;
  19. if(d==6)
  20. {
  21. cout<<"6 10 15 "<<d-1<<endl;
  22. }
  23. else if(d==10)
  24. {
  25. cout<<"6 15 14 "<<d-5<<endl;
  26. }
  27. else if(d==14)
  28. {
  29. cout<<"6 10 15 "<<d-1<<endl;
  30. }
  31. else cout<<"6 10 14 "<<d<<endl;
  32. }
  33. }
  34.  
  35.  
  36. return 0;
  37. }
  38.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement