Walking While Drinking Beer

No attempts yetTime limit1sMemory limit128 MB

Problem

Sanggeun and his friends live in Songdo and want to go to the Pentaport Rock Festival, which is held in Songdo. This year they decided to walk there while drinking beer. They start from Sanggeun's house carrying one box of beer, and a box holds 20 bottles. They must never get thirsty, so they drink one bottle every 50 meters. In other words, walking 50 meters requires drinking one bottle right before that stretch.

The festival site is very far from Sanggeun's house, so they may need to buy more beer along the way. They checked online beforehand, and luckily there are convenience stores that sell beer. At a convenience store they can throw away the empty bottles and buy new ones. The box still cannot hold more than 20 bottles. Right after leaving a store they must drink one bottle before walking the next 50 meters.

You are given the coordinates of the convenience stores, Sanggeun's house, and the Pentaport Rock Festival. Write a program that decides whether Sanggeun and his friends can reach the festival happily.

Input

The first line contains the number of test cases tt. (t50t \le 50)

The first line of each test case contains the number of convenience stores nn that sell beer. (0n1000 \le n \le 100)

The next n+2n+2 lines contain, in this order, the coordinates of Sanggeun's house, the nn convenience stores, and the Pentaport Rock Festival. Each coordinate is a pair of integers xx and yy. (both values in meters, 32768x,y32767-32768 \le x, y \le 32767)

Songdo is a rectangular city. The distance between two coordinates is the absolute difference of the xx values plus the absolute difference of the yy values (Manhattan distance).

Output

Print one line per test case. Print happy if Sanggeun and his friends can reach the festival, or sad if they run out of beer partway and cannot walk any further.