#include <iostream>
#include <cstdio>
using namespace std;
void vp(long a[3], long b[3], long c[3]){
	for(long i=0;i<3;i++) c[i] = a[i]+b[i];
}
void vm(long a[3], long b[3], long c[3]){
	for(long i=0;i<3;i++) c[i] = a[i]-b[i];
}
void mv(long a[3][3], long b[3], long c[3]){
	for(long i=0;i<3;i++){
		c[i] = 0;
		for(long j=0;j<3;j++) c[i] += a[j][i]*b[j];
	}
}
void minv(long a[3][3], long b[3][3]){
	long c = a[0][0]*a[1][1]*a[2][2];
	c     += a[1][0]*a[2][1]*a[0][2];
	c     += a[2][0]*a[0][1]*a[1][2];
	c     -= a[0][0]*a[2][1]*a[1][2];
	c     -= a[2][0]*a[1][1]*a[0][2];
	c     -= a[1][0]*a[0][1]*a[2][2];
	if(c<0) c = -1;
	else c = 1;
	b[0][0] = a[1][1]*a[2][2]-a[1][2]*a[2][1]*c;
	b[0][1] = a[0][2]*a[2][1]-a[0][1]*a[2][2]*c;
	b[0][2] = a[0][1]*a[1][2]-a[0][2]*a[1][1]*c;
	b[1][0] = a[1][2]*a[2][0]-a[1][0]*a[2][2]*c;
	b[1][1] = a[0][0]*a[2][2]-a[0][2]*a[2][0]*c;
	b[1][2] = a[0][2]*a[1][0]-a[0][0]*a[1][2]*c;
	b[2][0] = a[1][0]*a[2][1]-a[1][1]*a[2][0]*c;
	b[2][1] = a[0][1]*a[2][0]-a[0][0]*a[2][1]*c;
	b[2][2] = a[0][0]*a[1][1]-a[0][1]*a[1][0]*c;
}

int main(){
	long v1[3],v2[3],v3[3],v4[3],v5[3];
	cin >> v1[0] >> v1[1] >> v1[2];
	cin >> v2[0] >> v2[1] >> v2[2];
	cin >> v3[0] >> v3[1] >> v3[2];
	cin >> v4[0] >> v4[1] >> v4[2];
	cin >> v5[0] >> v5[1] >> v5[2];
	long c1[3],c2[3],c3[3],c4[3];
	vm(v2,v1,c1);
	vm(v3,v1,c2);
	vm(v4,v1,c3);
	vm(v5,v1,c4);
	long m[3][3],b[3][3];
	for(long i=0;i<3;i++) m[0][i] = c2[i];
	for(long i=0;i<3;i++) m[1][i] = c3[i];
	for(long i=0;i<3;i++) m[2][i] = c4[i];
	minv(m,b);
	long s[3];
	mv(b,c1,s);
	if(s[0]>=0 and s[1]>=0 and s[2]>=0) cout << "MISS" << endl;
	else cout << "HIT" << endl;
}