fork download
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4. #define int long long
  5. #define yes cout << "YES\n";
  6. #define no cout << "NO\n";
  7.  
  8.  
  9. void FastIO(){
  10. ios_base::sync_with_stdio(false);
  11. cin.tie(nullptr);
  12. cout.tie(nullptr);
  13. }
  14.  
  15. void solve(){
  16. int n;
  17. cin >> n;
  18.  
  19. if(n%2 == 1 || n < 4){
  20. cout << -1 << '\n';
  21. return;
  22. }
  23. int mini = (n+5) /6;
  24. int maxa = n/4;
  25.  
  26.  
  27. cout << mini << ' ' << maxa << '\n';
  28. }
  29.  
  30.  
  31. signed main(){
  32. FastIO();
  33.  
  34. int t = 1;
  35. cin >> t;
  36.  
  37. while (t--){
  38. solve();
  39. }
  40. return 0;
  41. }
  42.  
Success #stdin #stdout 0.01s 5328KB
stdin
4
4
7
24
998244353998244352
stdout
1 1
-1
4 6
166374058999707392 249561088499561088