406019: GYM102219 B SpongeBob SquarePants

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

B. SpongeBob SquarePantstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

Sponge Bob, the famous cartoon character can only wear square shape pants. Squares shape can be described in geometry as having 4 right angles, just like rectangles. But a square is a special case of rectangle where its width and height are the same.

You are given the width and the height of a 4 right angled shape and need to figure out if it is a square or a rectangle for Sponge Bob. He will get all the square ones as his new pants for the coming Eidul Fitri.

Input

The first line contains $$$T$$$, the number of test cases. For each test case there is a line with two integers (1 ≤ $$$w, h$$$ ≤ 1,000,000) representing width and height, respectively.

Output

For each test case, print one line consists of $$$'YES'$$$ (without quotes) if the shape is a square and good for Sponge Bob's pants, otherwise print $$$'NO'$$$ (without quotes) if it is a rectangle and not suitable to be Sponge Bob's pants.

ExampleInput
4
9 9
16 30
200 33
547 547
Output
YES
NO
NO
YES

加入题单

算法标签: