New Sergey's game#4720

New Sergey's game

1 saniye
128 megabayt
Çok kolay

C-student Sergey often asks A-student Vasya to do his homework. Vasya is a genius, but he still cannot cope with the work instantly, so Sergey has to wait. Sergey gets bored waiting with nothing to do. Not so long ago, he came up with a new game to pass the time.

On the white table with a coordinate system, Sergey puts a rectangular sheet of black paper. Above it, he puts a rectangular sheet of white paper so that it may overlap a portion of the black sheet. The sides of both sheets of paper are parallel to the coordinate axes. After that, Sergey chooses a point on the plane of the table. If it lands on the black sheet, Sergey believes that waiting is not boring; otherwise, he becomes upset.

Help Sergey to determine whether he gets upset or not.

Giriş

First, you are given the coordinates of the upper left corner and then the bottom right corner of the black rectangle, then the coordinates of the corresponding corners of the white rectangle in the same format, and finally the coordinates of the point. All coordinates are integers, not greater than by absolute value.

Çıktı

Print "SAD" if Sergey is sad (if the point falls on the boundary, Sergey considers it as belonging to the black sheet), and "HAPPY" otherwise.

Örnekler

Örnek 1

Loading
Loading

Örnek 2

Loading
Loading