#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");
}