#include<iostream>
#include<vector>
#include<cmath>

using namespace std;

#define rep(i, n) for (int i = 0; i < int(n); ++i)

typedef long double D;
typedef vector<D> V;
typedef vector<V> M;

const D EPS = 1e-8;

int sig(D a, D b = 0) {return a < b - EPS ? -1 : a > b + EPS ? 1 : 0;}

V gauss_jordan(M m, V v) {
  for (int r = m.size(); r--; ) {
    int p = r;
    rep (i, r) if (abs(m[i][r]) > abs(m[p][r])) p = i;
    swap(m[r], m[p]);
    swap(v[r], v[p]);
    v[r] /= m[r][r];
    rep (i, r) m[r][i] /= m[r][r];
    rep (i, m.size()) if(i != r) {
      v[i] -= m[i][r] * v[r];
      rep (k, r) m[i][k] -= m[i][r] * m[r][k];
    }
  }
  return v;
}

int main() {
  D in[5][3];
  rep (i, 5) rep (j, 3) cin >> in[i][j];
  M m(3, V(3));
  V v(3);
  rep (i, 3) rep (j, 3) m[j][i] = in[2 + i][j] - in[0][j];
  rep (i, 3) v[i] = in[1][i] - in[0][i];
  V r = gauss_jordan(m, v);
  rep (i, 3) if (sig(r[i]) < 0) {
    cout << "HIT" << endl;
    return 0;
  }
  if (sig(r[0] + r[1] + r[2], 1) < 0) cout << "HIT" << endl;
  else cout << "MISS" << endl;
}