// ?????¬???????????¬??????

#include <iostream>
#include <iomanip>
#include <cstdio>
#include <string>
#include <cstring>
#include <deque>
#include <list>
#include <queue>
#include <stack>
#include <vector>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <complex>
#include <cmath>
#include <limits>
#include <cfloat>
#include <climits>
#include <ctime>
#include <cassert>
#include <numeric>
#include <fstream>
#include <functional>
using namespace std;

#define rep(i,a,n) for(int (i)=(a); (i)<(n); (i)++)
#define repq(i,a,n) for(int (i)=(a); (i)<=(n); (i)++)
#define repr(i,a,n) for(int (i)=(a); (i)>=(n); (i)--)
#define int long long int

template<typename T> void chmax(T &a, T b) {a = max(a, b);}
template<typename T> void chmin(T &a, T b) {a = min(a, b);}
template<typename T> void chadd(T &a, T b) {a = a + b;}

typedef pair<int, int> pii;
typedef long long ll;

int dx[] = {0, 0, 1, -1};
int dy[] = {1, -1, 0, 0};
constexpr ll INF = 1001001001001001LL;
constexpr ll MOD = 1000000007LL;

// calculate vector x which satisfy Ax = b
// (A is N*N Matrix, b, x is N-dim vector)

template <typename T>
using Matrix = vector< vector<T> >;
constexpr double EPS = 1e-8;

template <typename T>
vector<double> gauss_jordan(const Matrix<T> &A, const vector<T> &b) {
    int N = A.size();
    // B = [A b]
    Matrix<double> B(N, vector<double>(N+1));
    for(int i=0; i<N; i++) {
        for(int j=0; j<=N; j++) {
            if(j < N) B[i][j] = A[i][j];
            else B[i][j] = b[i];
        }
    }

    for(int i=0; i<N; i++) {
        int pivot = i;
        for(int j=i+1; j<N; j++) {
            if(abs(B[j][i]) > abs(B[pivot][i])) pivot = j;
        }
        swap(B[i], B[pivot]);

        // pivot is zero -> No solution or Not unique
        if(abs(B[i][i]) < EPS) {
            cout << "MISS" << endl;
            exit(0);
        }

        for(int j=i+1; j<=N; j++) B[i][j] /= B[i][i];
        for(int j=0; j<N; j++) {
            if(i != j) {
                for(int k=i+1; k<=N; k++) B[j][k] -= B[j][i] * B[i][k];
            }
        }
    }
    vector<double> x(N);
    for(int i=0; i<N; i++) x[i] = B[i][N];
    return x;
}

double pos[5][3];
signed main() {
    rep(i,0,5) rep(j,0,3) cin >> pos[i][j];

    Matrix<double> mat(3, vector<double>(3));
    vector<double> vec(3);

    rep(i,0,3) {
        mat[i][0] = pos[3][i] - pos[2][i];
        mat[i][1] = pos[4][i] - pos[2][i];
        mat[i][2] = pos[0][i] - pos[1][i];
    }
    rep(i,0,3) vec[i] = pos[0][i] - pos[2][i];

    vector<double> ans = gauss_jordan(mat, vec);
    if(ans[0] < 0 || ans[1] < 0 || ans[0] + ans[1] > 1.0 || ans[2] < 0) cout << "HIT" << endl;
    else cout << "MISS" << endl;
    return 0;
}