#include <iostream>
using namespace std;
int main() {
int bl_up_x, bl_up_y, bl_dw_x, bl_dw_y;
int wh_up_x, wh_up_y, wh_dw_x, wh_dw_y;
int p_x, p_y;
cin >> bl_up_x >> bl_up_y >> bl_dw_x >> bl_dw_y;
cin >> wh_up_x >> wh_up_y >> wh_dw_x >> wh_dw_y;
cin >> p_x >> p_y;
bool is_in_black = p_x <= bl_dw_x and p_x >= bl_up_x and p_y <= bl_up_y and p_y >= bl_dw_y;
bool is_in_white = p_x < wh_dw_x and p_x > wh_up_x and p_y < wh_up_y and p_y > wh_dw_y;
cout << (is_in_black and not is_in_white ? "HAPPY" : "SAD");
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglpbnQgYmxfdXBfeCwgYmxfdXBfeSwgYmxfZHdfeCwgYmxfZHdfeTsKCWludCB3aF91cF94LCB3aF91cF95LCB3aF9kd194LCB3aF9kd195OwoJaW50IHBfeCwgcF95OwoJY2luID4+IGJsX3VwX3ggPj4gYmxfdXBfeSA+PiBibF9kd194ID4+IGJsX2R3X3k7CgljaW4gPj4gd2hfdXBfeCA+PiB3aF91cF95ID4+IHdoX2R3X3ggPj4gd2hfZHdfeTsKCWNpbiA+PiBwX3ggPj4gcF95OwoJYm9vbCBpc19pbl9ibGFjayA9IHBfeCA8PSBibF9kd194IGFuZCBwX3ggPj0gYmxfdXBfeCBhbmQgcF95IDw9IGJsX3VwX3kgYW5kIHBfeSA+PSBibF9kd195OwoJYm9vbCBpc19pbl93aGl0ZSA9IHBfeCA8IHdoX2R3X3ggYW5kIHBfeCA+IHdoX3VwX3ggYW5kIHBfeSA8IHdoX3VwX3kgYW5kIHBfeSA+IHdoX2R3X3k7Cgljb3V0IDw8IChpc19pbl9ibGFjayBhbmQgbm90IGlzX2luX3doaXRlID8gIkhBUFBZIiA6ICJTQUQiKTsKfQ==