Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include<bits/stdc++.h>
- using namespace std;
- int main() {
- long long n;
- cin>> n;
- while(n--)
- {
- long long a,b ;
- cin>>a>>b;
- if (a==b)
- {
- if((a*b)%2==0)
- cout<<"YES"<<" "<<(a*b)/2;
- else
- cout<<"NO";
- }
- else
- {
- cout<<"NO";
- }
- cout <<endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement