#include <iostream>
using namespace std;
struct dot
{
int x, y;
dot(){
cin >> x >> y;
}
};
struct square
{
dot upper_left, lower_right;
bool is_point_on(dot &p) const
{
return p.x < lower_right.x and p.x > upper_left.x and p.y < upper_left.y and p.y > lower_right.y;
}
bool is_point_in(dot &p) const
{
return p.x <= lower_right.x and p.x >= upper_left.x and p.y <= upper_left.y and p.y >= lower_right.y;
}
};
int main() {
square black, white;
dot point;
cout << ((black.is_point_in(point) and not white.is_point_on(point))?"HAPPY":"SAD");
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKc3RydWN0IGRvdAp7CglpbnQgeCwgeTsKCWRvdCgpewoJCWNpbiA+PiB4ID4+IHk7Cgl9Cn07CnN0cnVjdCBzcXVhcmUKewoJZG90IHVwcGVyX2xlZnQsIGxvd2VyX3JpZ2h0OwoJYm9vbCBpc19wb2ludF9vbihkb3QgJnApIGNvbnN0Cgl7CgkJcmV0dXJuIHAueCA8IGxvd2VyX3JpZ2h0LnggYW5kIHAueCA+IHVwcGVyX2xlZnQueCBhbmQgcC55IDwgdXBwZXJfbGVmdC55IGFuZCBwLnkgPiBsb3dlcl9yaWdodC55OwoJfQoJYm9vbCBpc19wb2ludF9pbihkb3QgJnApIGNvbnN0Cgl7CgkJcmV0dXJuIHAueCA8PSBsb3dlcl9yaWdodC54IGFuZCBwLnggPj0gdXBwZXJfbGVmdC54IGFuZCBwLnkgPD0gdXBwZXJfbGVmdC55IGFuZCBwLnkgPj0gbG93ZXJfcmlnaHQueTsKCX0KfTsKCmludCBtYWluKCkgewoJc3F1YXJlIGJsYWNrLCB3aGl0ZTsKCWRvdCBwb2ludDsKCWNvdXQgPDwgKChibGFjay5pc19wb2ludF9pbihwb2ludCkgYW5kIG5vdCB3aGl0ZS5pc19wb2ludF9vbihwb2ludCkpPyJIQVBQWSI6IlNBRCIpOwp9