Saleh127

uva 11388.cpp

Jun 6th, 2020
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define test int t; cin>>t; while (t--)
  4. #define ll long long int
  5. #define Faster ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
  6. #define pi acos(-1)
  7. #define yes printf("YES\n");
  8. #define no printf("NO\n");
  9. int main()
  10. {
  11. Faster
  12. ll a,b,c,d,e,f,i,j,k,l;
  13. cin>>a;
  14. while(a--)
  15. {
  16. cin>>b>>c;
  17. if(c%b!=0)
  18. {
  19. cout<<"-1\n";
  20. }
  21. else
  22. {
  23. cout<<b<<" "<<c<<endl;
  24. }
  25. }
  26. return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment