Error in the program

Mistakes

  1. print Yes or No (Y and N capital)
  2. to handle multiple testcases use this
int t;cin>>t;
while(t--){
   // your code here
}

Modified Code