#include<stdio.h>
#include<algorithm>
#include<math.h>
using namespace std;
const double EPS = 1e-10;
const double INF = 1e+10;
const double PI = acos(-1);
int sig(double r) { return (r < -EPS) ? -1 : (r > +EPS) ? +1 : 0; }
inline double ABS(double a){return max(a,-a);}
struct Pt {
	double x, y;
	Pt() {}
	Pt(double x, double y) : x(x), y(y) {}
	Pt operator+(const Pt &a) const { return Pt(x + a.x, y + a.y); }
	Pt operator-(const Pt &a) const { return Pt(x - a.x, y - a.y); }
	Pt operator*(const Pt &a) const { return Pt(x * a.x - y * a.y, x * a.y + y * a.x); }
	Pt operator-() const { return Pt(-x, -y); }
	Pt operator*(const double &k) const { return Pt(x * k, y * k); }
	Pt operator/(const double &k) const { return Pt(x / k, y / k); }
	double ABS() const { return sqrt(x * x + y * y); }
	double abs2() const { return x * x + y * y; }
	double arg() const { return atan2(y, x); }
	double dot(const Pt &a) const { return x * a.x + y * a.y; }
	double det(const Pt &a) const { return x * a.y - y * a.x; }
};
double tri(const Pt &a, const Pt &b, const Pt &c) { return (b - a).det(c - a); }
int iSP(Pt a, Pt b, Pt c) {
	int s = sig((b - a).det(c - a));
	if (s) return s;
	if (sig((b - a).dot(c - a)) < 0) return -2; // c-a-b
	if (sig((a - b).dot(c - b)) < 0) return +2; // a-b-c
	return 0;
}
Pt pLL(Pt a, Pt b, Pt c, Pt d) {
	b = b - a; d = d - c; return a + b * (c - a).det(d) / b.det(d);
}
double x[6];
double y[6];
double z[6];
Pt p[6];
int main(){
	for(int i=0;i<5;i++)scanf("%lf%lf%lf",x+i,y+i,z+i);
	for(int i=1;i<5;i++){
		x[i]-=x[0];y[i]-=y[0];z[i]-=z[0];
	}
	double th=atan2(y[1],x[1]);
	for(int i=1;i<5;i++){
		double X=x[i]*cos(th)+y[i]*sin(th);
		double Y=-x[i]*sin(th)+y[i]*cos(th);
		x[i]=X;y[i]=Y;
	}
	th=atan2(z[1],x[1]);
	for(int i=1;i<5;i++){
		double X=x[i]*cos(th)+z[i]*sin(th);
		double Z=-x[i]*sin(th)+z[i]*cos(th);
		x[i]=X;z[i]=Z;
	}
	for(int i=0;i<5;i++)p[i]=Pt(y[i],z[i]);
	double S=ABS((p[3]-p[2]).det(Pt(p[4]-p[2])));
	//for(int i=1;i<5;i++)printf("%f %f %f\n",x[i],y[i],z[i]);
	if(S<EPS){
		printf("HIT\n");return 0;
	}
	bool L=true;
	bool R=true;
	for(int i=0;i<3;i++){
		int res=iSP(p[2+i],Pt(0,0),p[2+(1+i)%3]);
		if(res==-1)L=false;
		if(res==1)R=false;
	}
	if(!L&&!R){
		printf("HIT\n");return 0;
	}
	for(int i=3;i<4;i++){
		if((p[i]).ABS()>EPS){
			swap(x[2],x[i]);
			swap(p[2],p[i]);
		}
	}
	Pt v=pLL(Pt(0,0),p[2],p[3],p[4]);
	double s1=(v-p[3]).ABS();
	double s2=(v-p[4]).ABS();
	double f=(x[3]*s2+x[4]*s1)/(s1+s2);
	double s3=(p[2]).ABS();
	double s4=v.ABS();
	double g=(f*s3+x[2]*s4)/(s3+s4);
	//printf("%f %f %f %f\n",v.x,v.y,f,g);
	if(g<x[1]+EPS&&g>-EPS)printf("MISS\n");
	else printf("HIT\n");
}