Find an integer Codechef Starters 73 (Rated till 6-Stars) problem solution

This post is all about the solution of the Find an integer Codechef Starters 73 (Rated till 6-Stars) problem solution.


Find an integer Codechef Starters 73 (Rated till 6-Stars) problem solution

Codechef 




Problem Statement:

Chef has two nephews who are obsessed with the integers XX and YY. If the following conditions are met, an integer NN is awesome:

1 l eq N l eq 1018

1≤N≤10 \s18

(N+Y)(N+Y) can be divided by XX.
(N+X)(N+X) can be divided by YY.
Find any fantastic integer NN. We can show that an answer exists under the given constraints.

It is important to note that you are not required to minimise the answer.

Format of Input :

The number of cases will be indicated by a single integer TT in the first line of input.
Each test case's first and only line includes 2 space-separated integers NN and MM — the number of apples and oranges, respectively.


Format of the Output :

For every test case, output YES if the group is perfect and NO or else on a new line.

Each character can be printed in either uppercase or lowercase. The strings YES, yes, Yes, and yES, for example, are all considered identical.


Also Check this out:-

Chef Plays Ludo Codechef Starters 73 (Rated till 6-Stars) problem solution, Click Here
Multivitamin Tablets Codechef Starters 73 (Rated till 6-Stars) problem solution, Click Here
Lucky Numbers Codechef Starters 73 (Rated till 6-Stars) problem solution, Click Here
Append for OR Codechef Starters 73 (Rated till 6-Stars) problem solution, Click Here
Consecutive Xor Codechef Starters 73 (Rated till 6-Stars) problem solution, Click Here
New Upcoming OnePlus 11 Specifications

New Upcoming OnePlus 11 Specifications, Click Here

Solution of the Problem: Click Here