require 'matrix'

my, enemy, b1, b2, b3 = $<.readlines.map {|l| Vector[*l.split.map(&:to_r)]}
v = enemy - my
va = b2 - b1
vb = b3 - b1
begin
  l, s, t = Matrix.columns([-v, va, vb]).lup.solve(my - b1).to_a
rescue
  puts "HIT"
  exit
end

puts 0 < l && l <= 1 && (s + t).between?(0, 1) && s >= 0 && t >= 0 ? "MISS" : "HIT"

