#include <vector>
#include <iostream>
using namespace std;
int main() {
	vector<vector<double> > A(3, vector<double>(4));
	vector<double> P(3);
	for (int i = 0; i < 3; ++i) cin >> P[i];
	for (int i = -1; i < 3; ++i) {
		for (int j = 0; j < 3; ++j) {
			cin >> A[j][(i + 4) % 4];
			A[j][(i + 4) % 4] -= P[j];
		}
	}
	for (int i = 0; i < 3; ++i) {
		int ptr = -1;
		for (int j = i; j < 3; ++j) {
			if (A[j][i] != 0) {
				ptr = j;
				break;
			}
		}
		if (ptr != i) swap(A[ptr], A[i]);
		double mult = 1.0 / A[i][i];
		for (int j = 0; j < 4; ++j) {
			A[i][j] *= mult;
		}
		for (int j = 0; j < 3; ++j) {
			if (j == i) continue;
			double submult = A[j][i];
			for (int k = 0; k < 4; ++k) {
				A[j][k] -= submult * A[i][k];
			}
		}
	}
	if (A[0][3] >= 0 && A[1][3] >= 0 && A[2][3] >= 0 && A[0][3] + A[1][3] + A[2][3] >= 1) {
		cout << "MISS" << endl;
	}
	else {
		cout << "HIT" << endl;
	}
	return 0;
}
