#include<cmath>
#include<algorithm>
#include<iostream>
#include<vector>
#include<climits>
#include<cfloat>

using namespace std;

typedef long double ld;

ld EPS = 1e-3;


ld add(ld a, ld b){
  if(abs(a+b) < EPS * (abs(a)+abs(b)))return 0;
  return a+b;
}

struct point{
  ld x,y,z;
  point(){}
  point(ld x,ld y,ld z) : x(x) , y(y), z(z){}

  point operator + (point p){
    return point(add(x,p.x), add(y,p.y),add(z,p.z));
  }

  point operator - (point p){
    return point(add(x,-p.x), add(y,-p.y),add(z,-p.z));
  }
};


ld dist(point a,point b){
  return sqrt(pow(a.x-b.x,2)+pow(a.y-b.y,2)+pow(a.z-b.z,2));
}

ld tetrahedra_volume(ld a,ld b,ld c,ld x,ld y,ld z){
#define sqr(x) ((x)*(x))
   ld tv=sqr(a*x)*(sqr(b)+sqr(c)-sqr(a)+sqr(y)+sqr(z)-sqr(x))
      +sqr(b*y)*(sqr(c)+sqr(a)-sqr(b)+sqr(z)+sqr(x)-sqr(y))
      +sqr(c*z)*(sqr(a)+sqr(b)-sqr(c)+sqr(x)+sqr(y)-sqr(z))
      -sqr(a*y*z)-sqr(b*z*x)-sqr(c*x*y)-sqr(a*b*c);

   ld V=sqrt(tv/144.0);
   if(V!=V)return -1;
   return sqrt(tv/144.0);
#undef sqr
}

ld tetrahedra_volume(point A,point B,point C,point D){
  ld a=dist(B,C),b=dist(C,A),c=dist(A,B);
  ld d=dist(D,A),e=dist(D,B),f=dist(D,C);
  ld V=tetrahedra_volume(a,b,c,d,e,f);
  if(V<0)return -1;
  return V;
}

int main(void){

  point P,Q,A,B,C;
  cin >> P.x >> P.y >> P.z;
  cin >> Q.x >> Q.y >> Q.z;
  cin >> A.x >> A.y >> A.z;
  cin >> B.x >> B.y >> B.z;
  cin >> C.x >> C.y >> C.z;

  ld res1=tetrahedra_volume(A,C,P,Q);
  ld res2=tetrahedra_volume(B,C,P,Q);
  ld res3=tetrahedra_volume(A,B,P,Q);
  if(res1==-1 || res2==-1 || res3==-1){
    cout << "MISS" << endl;
    return 0;
  }

  ld res4=tetrahedra_volume(A,B,C,P);
  ld res5=tetrahedra_volume(A,B,C,Q);

  if(res5==-1)cout << "MISS" << endl;
  else if(abs((res1+res2+res3)-(res4+res5))<EPS)cout << "MISS" << endl;
  else cout << "HIT" << endl;

  return 0;
}