Unbreakable Floor

Alan bought a new house. He likes rectangles, so he wants his floor full of identical rectangular shapes. Imagine he has a floor of 5 × 6, he may fill this floor with rectangles of 1 × 2 in at least two ways: Picture (a) shows a ‘breakable’ layout, since there is a straight line through the whole floor which divides the floor into two parts — a 5 × 4 rectangle and a 5 × 2 rectangle, and all the 1 × 2 rectangles are not destroyed. Picture (b) shows a ‘unbreakable’ layout, since you cannot divide it into two parts without destroying any 1 × 2 rectangle. Alan likes unbreakable floorings, but he’s not sure if it is possible for any size of floor and rectangle shape. Can you tell him? Input The first line contains the number of tests t (1 ≤ t ≤ 40). Each case consists of a single line with four positive integers p, q, a, b (1 ≤ p, q, a, b ≤ 10000). Output For each test case, print the case number first. Then print the word ‘Yes’ if it is possible to make a unbreakable floor of a × b with rectangles of p × q, otherwise print the word ‘No’. Answer for each case should be in exactly one line. Sample Input 3 1256 1 2 3 17 2 3 11 18 Sample Output Case 1:Yes Case 2:No Case 3:Yes