#include <algorithm>
#include <iostream>
#include <vector>

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> pii;

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

const double EPS = 1e-10;

double det(double A[3][3])
{
    return A[0][0]*A[1][1]*A[2][2] + A[0][1]*A[1][2]*A[2][0] + A[0][2]*A[1][0]*A[2][1]
         - A[0][0]*A[1][2]*A[2][1] - A[0][1]*A[1][0]*A[2][2] - A[0][2]*A[1][1]*A[2][0];
}

void solve(double A[3][3], double b[3], double ans[3])
{
    double d = det(A);
    rep(i, 3){
        double tmp[3][3];
        rep(j, 3) rep(k, 3){
            tmp[j][k] = k == i ? b[j] : A[j][k];
        }
        ans[i] = det(tmp) / d;
    }
}

int main()
{
    double o[3];
    rep(i, 3) cin >> o[i];
    
    double e[3], b[3][3];
    rep(i, 3){
        cin >> e[i];
        e[i] -= o[i];
    }
    rep(i, 3) rep(j, 3){
        cin >> b[j][i];
        b[j][i] -= o[j];
    }
    
    double a[3];
    solve(b, e, a);
    
    if(a[0] > -EPS && a[1] > -EPS && a[2] > -EPS && a[0]+a[1]+a[2] > 1-EPS){
        cout << "MISS" << endl;
    }
    else{
        cout << "HIT" << endl;
    }
}