Misha and Vasya participated in a Codeforces contest. Unfortunately, each of them solved only one problem, though successfully submitted it at the first attempt. Misha solved the problem that costs a points and Vasya solved the problem that costs b points. Besides, Misha submitted the problem c minutes after the contest started and Vasya submitted the problem d minutes after the contest started. As you know, on Codeforces the cost of a problem reduces as a round continues. That is, if you submit a problem that costs p points t minutes after the contest started, you get $\operatorname{max}(\frac{3p}{10}, p - \frac{p}{250} \times t)$ points. 

Misha and Vasya are having an argument trying to find out who got more points. Help them to find out the truth.


-----Input-----

The first line contains four integers a, b, c, d (250 ≤ a, b ≤ 3500, 0 ≤ c, d ≤ 180). 

It is guaranteed that numbers a and b are divisible by 250 (just like on any real Codeforces round).


-----Output-----

Output on a single line: 

"Misha" (without the quotes), if Misha got more points than Vasya.

"Vasya" (without the quotes), if Vasya got more points than Misha.

"Tie" (without the quotes), if both of them got the same number of points.


-----Examples-----
Input
500 1000 20 30

Output
Vasya

Input
1000 1000 1 1

Output
Tie

Input
1500 1000 176 177

Output
Misha

Difficulty: EASY
Tags: Implementation

Starter code:

Solutions:
(a, b, c, d) = list(map(int, input().split()))
m = max(3 * a / 10, a - a / 250 * c)
v = max(3 * b / 10, b - b / 250 * d)
if m > v:
	print('Misha')
elif m < v:
	print('Vasya')
else:
	print('Tie')


(a, b, c, d) = map(int, input().split())
x = max(3 * a // 10, a - a // 250 * c)
y = max(3 * b // 10, b - b // 250 * d)
if x > y:
	print('Misha')
elif x < y:
	print('Vasya')
elif x == y:
	print('Tie')


(a, b, c, d) = map(int, input().split())
p1 = int(max(3 * a / 10, a * (1 - c / 250)))
p2 = int(max(3 * b / 10, b * (1 - d / 250)))
if p1 < p2:
	print('Vasya')
elif p1 > p2:
	print('Misha')
else:
	print('Tie')


(x, y, t1, t2) = map(int, input().strip().split())
p1 = max(3 * x / 10, x - x / 250 * t1)
p2 = max(3 * y / 10, y - y / 250 * t2)
if p1 > p2:
	print('Misha')
elif p1 < p2:
	print('Vasya')
else:
	print('Tie')


(n, m, k, l) = map(int, input().split())
a = max(n * 3 / 10, n - n / 250 * k)
b = max(m * 3 / 10, m - m / 250 * l)
if a > b:
	print('Misha')
elif a < b:
	print('Vasya')
else:
	print('Tie')


(a, b, c, d) = input().split()
a = int(a)
b = int(b)
c = int(c)
d = int(d)
misha = max(3 * a / 10, a - a / 250 * c)
vashya = max(3 * b / 10, b - b / 250 * d)
if misha > vashya:
	print('Misha')
elif vashya > misha:
	print('Vasya')
else:
	print('Tie')


def fastio():
	import sys
	from io import StringIO
	from atexit import register
	global input
	sys.stdin = StringIO(sys.stdin.read())
	input = lambda : sys.stdin.readline().rstrip('\r\n')
	sys.stdout = StringIO()
	register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))
fastio()
MOD = 10 ** 9 + 7
I = lambda : list(map(int, input().split()))
(a, b, c, d) = I()
v = max(3 * a / 10, a - a / 250 * c)
m = max(3 * b / 10, b - b / 250 * d)
if v > m:
	print('Misha')
elif m > v:
	print('Vasya')
else:
	print('Tie')


import math
from operator import itemgetter

def get_primes(prime_supr):
	is_prime = [0] * 2 + [1] * prime_supr
	for i in range(2, int(math.sqrt(prime_supr)) + 1):
		if is_prime[i]:
			for j in range(i * i, prime_supr + 1, i):
				is_prime[j] = 0
	return is_prime
get_int = lambda : map(int, input().split())
(p1, p2, t1, t2) = get_int()
(a1, a2) = (max(3 * p1 / 10, p1 - p1 * t1 / 250), max(3 * p2 / 10, p2 - p2 * t2 / 250))
if a1 > a2:
	print('Misha')
elif a2 > a1:
	print('Vasya')
else:
	print('Tie')


def after_loss(p, t):
	return max(3 / 10 * p, p - p / 250 * t)
(a, b, c, d) = map(int, input().split())
x = after_loss(a, c)
y = after_loss(b, d)
if x > y:
	print('Misha')
elif x < y:
	print('Vasya')
else:
	print('Tie')


(a, b, c, d) = map(int, input().split())
score1 = max(3 * a / 10, a - a / 250 * c)
score2 = max(3 * b / 10, b - b / 250 * d)
if score1 > score2:
	print('Misha')
elif score1 < score2:
	print('Vasya')
else:
	print('Tie')


a = list(input().split())
ms = max(3 * int(a[0]) / 10, int(a[0]) - int(a[0]) / 250 * int(a[2]))
vs = max(3 * int(a[1]) / 10, int(a[1]) - int(a[1]) / 250 * int(a[3]))
if ms == vs:
	print('Tie')
elif ms > vs:
	print('Misha')
else:
	print('Vasya')


allargs = input()
(a, b, c, d) = [int(i) for i in allargs.split()]

def firstp(p):
	return 3 * p / 10

def secondp(p, t):
	return p - p / 250 * t
pm = max(firstp(a), secondp(a, c))
pv = max(firstp(b), secondp(b, d))
if pm > pv:
	print('Misha')
elif pm < pv:
	print('Vasya')
else:
	print('Tie')


(p1, p2, t1, t2) = map(int, input().split())
x1 = max(3 * p1 / 10, p1 - p1 * t1 / 250)
x2 = max(3 * p2 / 10, p2 - p2 * t2 / 250)
if x1 == x2:
	ans = 'Tie'
elif x1 > x2:
	ans = 'Misha'
else:
	ans = 'Vasya'
print(ans)


n = map(int, input().split())
n = list(n)
(a, b, c, d) = n[0:4]
m1 = max(0.3 * a, a - a / 250 * c)
m2 = max(0.3 * b, b - b / 250 * d)
if m1 > m2:
	print('Misha')
elif m1 < m2:
	print('Vasya')
else:
	print('Tie')


(m, v, tm, tv) = map(int, input().split())
bm = max(3 * m / 10, m - m / 250 * tm)
bv = max(3 * v / 10, v - v / 250 * tv)
if bm == bv:
	print('Tie')
elif bm >= bv:
	print('Misha')
else:
	print('Vasya')


[a, b, c, d] = [int(x) for x in input().split()]
mish = max(3 * a / 10, a - a * c / 250)
vas = max(3 * b / 10, b - b * d / 250)
if mish > vas:
	print('Misha')
elif mish == vas:
	print('Tie')
else:
	print('Vasya')


(a, b, c, d) = list(map(int, input().split()))
m_val = max(3 * a / 10, a - a / 250 * c)
v_val = max(3 * b / 10, b - b / 250 * d)
if m_val > v_val:
	print('Misha')
elif m_val < v_val:
	print('Vasya')
else:
	print('Tie')


z = lambda x, y: max(3 * x / 10, x - x / 250 * y)
(a, b, c, d) = map(int, input().split())
e = z(a, c)
f = z(b, d)
print('Misha' if e > f else 'Vasya' if e < f else 'Tie')


z = list(map(int, input().split()))
vanya = 0
misha = 0
misha = max(3 * z[0] / 10, z[0] - z[0] / 250 * z[2])
vanya = max(3 * z[1] / 10, z[1] - z[1] / 250 * z[3])
if misha == vanya:
	print('Tie')
elif misha < vanya:
	print('Vasya')
else:
	print('Misha')


def max(x, y):
	if x > y:
		return x
	else:
		return y
split_input = input().split()
a = int(split_input[0])
b = int(split_input[1])
c = int(split_input[2])
d = int(split_input[3])
misha = max(3 * a / 10, a - a / 250 * c)
vasya = max(3 * b / 10, b - b / 250 * d)
if misha > vasya:
	print('Misha')
elif misha < vasya:
	print('Vasya')
else:
	print('Tie')


(a, b, c, d) = map(int, input().split())
M = max(3 * a / 10, a - a / 250 * c)
V = max(3 * b / 10, b - b / 250 * d)
if M > V:
	print('Misha')
elif M < V:
	print('Vasya')
else:
	print('Tie')


def main():
	(a, b, c, d) = map(int, input().split())
	x = max(3 * a // 10, a - a * c // 250)
	y = max(3 * b // 10, b - b * d // 250)
	print(('Misha', 'Vasya', 'Tie')[(x < y) + (x == y) * 2])

def __starting_point():
	main()
__starting_point()


import sys
from itertools import groupby
lines = []
for Line in sys.stdin:
	lines.append(Line.rstrip('\n'))
(a, b, c, d) = list(map(int, lines[0].split()))
m = max(3 / 10 * a, a - a / 250 * c)
v = max(3 / 10 * b, b - b / 250 * d)
if m == v:
	print('Tie')
elif m > v:
	print('Misha')
else:
	print('Vasya')


(a, b, c, d) = map(int, input().split())
maxv = 0
maxm = 0
maxv = max(3 * a / 10, a - a / 250 * c)
maxm = max(3 * b / 10, b - b / 250 * d)
if maxv > maxm:
	print('Misha')
if maxm > maxv:
	print('Vasya')
if maxm == maxv:
	print('Tie')


def findPoints(p, t):
	return int(max(p * 0.3, p - t * p // 250))
(a, b, c, d) = map(int, input().strip().split())
misha = findPoints(a, c)
vasya = findPoints(b, d)
if misha > vasya:
	print('Misha')
elif vasya > misha:
	print('Vasya')
else:
	print('Tie')


x = list(map(int, input().split(' ')))
v1 = max(3 * x[0] / 10, x[0] - x[0] / 250 * x[2])
v2 = max(3 * x[1] / 10, x[1] - x[1] / 250 * x[3])
if v1 == v2:
	print('Tie')
elif v1 > v2:
	print('Misha')
else:
	print('Vasya')


(a, b, c, d) = map(int, input().split())
c1 = max(3 * a / 10, a - a / 250 * c)
c2 = max(3 * b / 10, b - b / 250 * d)
if c1 > c2:
	print('Misha')
elif c1 < c2:
	print('Vasya')
else:
	print('Tie')


(a, b, c, d) = map(int, input().split())
misha = max(3 * a // 10, a - a // 250 * c)
vasya = max(3 * b // 10, b - b // 250 * d)
print('Tie' if vasya == misha else 'Vasya' if vasya > misha else 'Misha')


(a, b, c, d) = map(int, input().split())

def points(possible, time):
	opt1 = 3 * possible / 10
	opt2 = possible - possible / 250 * time
	if opt1 > opt2:
		return opt1
	else:
		return opt2
misha = points(a, c)
vasya = points(b, d)
if misha > vasya:
	print('Misha')
elif vasya > misha:
	print('Vasya')
else:
	print('Tie')


def res(p, t):
	return max(3 * p / 10, p - p / 250 * t)
s = input()
s = s.split()
a = res(int(s[0]), int(s[2]))
b = res(int(s[1]), int(s[3]))
if a > b:
	print('Misha')
elif a < b:
	print('Vasya')
else:
	print('Tie')


x = input().split(' ')
(a, b, c, d) = x
ac = max(3 * int(a) / 10, int(a) - int(a) / 250 * int(c))
bd = max(3 * int(b) / 10, int(b) - int(b) / 250 * int(d))
if ac == bd:
	print('Tie')
elif ac > bd:
	print('Misha')
else:
	print('Vasya')


def f(p, t):
	return max(3 * p // 10, p - p * t // 250)
(a, b, c, d) = map(int, input().split())
(m, v) = (f(a, c), f(b, d))
if v == m:
	print('Tie')
elif v > m:
	print('Vasya')
else:
	print('Misha')


(a, b, c, d) = map(int, input().split())
mih = max(3 * a / 10, a - a / 250 * c)
vas = max(3 * b / 10, b - b / 250 * d)
if mih > vas:
	print('Misha')
elif mih == vas:
	print('Tie')
else:
	print('Vasya')


____ = ['Misha', 'Vasya', 'Tie']
_ = list(map(int, input().split()))
__ = max(3 * _[0] // 10, _[0] - _[0] // 250 * _[2])
___ = max(3 * _[1] // 10, _[1] - _[1] // 250 * _[3])
if __ > ___:
	print(____[0])
elif __ < ___:
	print(____[1])
else:
	print(____[2])


import sys
(a, b, c, d) = map(int, sys.stdin.readline().split())
misha = max(3 * a // 10, a - a * c // 250)
vasya = max(3 * b // 10, b - b * d // 250)
if misha > vasya:
	print('Misha')
elif misha < vasya:
	print('Vasya')
else:
	print('Tie')


x = [int(w) for w in input().split()]
m = max(3 * x[0] / 10, x[0] - x[0] * x[2] / 250)
v = max(3 * x[1] / 10, x[1] - x[1] * x[3] / 250)
if m > v:
	print('Misha')
if m < v:
	print('Vasya')
if m == v:
	print('Tie')


(mishaA, vasyaB, mishaT, vasyaT) = map(int, input().split())
vasyaPoints = max(3 * vasyaB / 10, vasyaB - vasyaB / 250 * vasyaT)
mishaPoints = max(3 * mishaA / 10, mishaA - mishaA / 250 * mishaT)
if vasyaPoints > mishaPoints:
	print('Vasya')
elif mishaPoints > vasyaPoints:
	print('Misha')
else:
	print('Tie')


__author__ = 'pxy'
(a, b, c, d) = (int(i) for i in input().split())
bmish = max(3 * a // 10, a - a // 250 * c)
bvit = max(3 * b // 10, b - b // 250 * d)
if bmish > bvit:
	print('Misha')
elif bmish == bvit:
	print('Tie')
else:
	print('Vasya')


(a, b, c, d) = [int(i) for i in input().split()]
misha1 = 3 * a / 10
misha2 = a - a / 250 * c
misha = max([misha1, misha2])
vasya1 = 3 * b / 10
vasya2 = b - b / 250 * d
vasya = max([vasya1, vasya2])
m = max([vasya, misha])
if misha == vasya:
	print('Tie')
elif misha > vasya:
	print('Misha')
else:
	print('Vasya')


(a, b, c, d) = map(int, input().split())
mp = max(3 * a / 10, a - a / 250 * c)
vp = max(3 * b / 10, b - b / 250 * d)
if mp > vp:
	print('Misha')
elif mp < vp:
	print('Vasya')
else:
	print('Tie')


(a, b, c, d) = map(int, input().split())
k = max(3 * a // 10, a - a // 250 * c)
p = max(3 * b // 10, b - b // 250 * d)
if k > p:
	print('Misha')
elif k < p:
	print('Vasya')
else:
	print('Tie')


from __future__ import division, print_function
import os, sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def ii():
	return int(input())

def fi():
	return float(input())

def si():
	return input()

def msi():
	return map(str, input().split())

def mi():
	return map(int, input().split())

def li():
	return list(mi())

def read():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def lcm(x, y):
	return x * y // gcd(x, y)
mod = 1000000007

def modInverse(b, m):
	g = gcd(b, m)
	if g != 1:
		return -1
	else:
		return pow(b, m - 2, m)

def ceil(x, y):
	if x % y == 0:
		return x // y
	else:
		return x // y + 1

def modu(a, b, m):
	a = a % m
	inv = modInverse(b, m)
	if inv == -1:
		return -999999999
	else:
		return inv * a % m
from math import log, factorial, cos, tan, sin, radians, floor, log2
import bisect
from decimal import *
getcontext().prec = 8
abc = 'abcdefghijklmnopqrstuvwxyz'
pi = 3.141592653589793

def gcd1(a):
	if len(a) == 1:
		return a[0]
	ans = a[0]
	for i in range(1, len(a)):
		ans = gcd(ans, a[i])
	return ans

def main():
	for _ in range(1):
		(a, b, c, d) = mi()
		p = max(3 * (a / 10), a - a / 250 * c)
		q = max(3 * (b / 10), b - b / 250 * d)
		if p > q:
			print('Misha')
		elif p < q:
			print('Vasya')
		else:
			print('Tie')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


(a, b, c, d) = map(float, input().split())

def value1(x):
	ans = 3 * x / 10
	return ans

def value2(x, t):
	ans = x - x / 250 * t
	return ans
M = max(value1(a), value2(a, c))
V = max(value1(b), value2(b, d))
if M > V:
	print('Misha')
if M < V:
	print('Vasya')
if M == V:
	print('Tie')


(a, b, c, d) = map(int, input().split())
misha_score = max(3 * a // 10, a - a // 250 * c)
vasya_score = max(3 * b // 10, b - b // 250 * d)
if misha_score == vasya_score:
	print('Tie')
elif misha_score > vasya_score:
	print('Misha')
else:
	print('Vasya')


read = lambda : map(int, input().split())
(a, b, c, d) = read()
f = lambda p, t: max(3 * p // 10, p - p // 250 * t)
(x, y) = (f(a, c), f(b, d))
print('Vasya' if x < y else 'Misha' if x > y else 'Tie')


def go():
	(m_p, v_p, m_t, v_t) = [int(i) for i in input().split(' ')]
	v = max(3 * v_p // 10, v_p - v_p // 250 * v_t)
	m = max(3 * m_p // 10, m_p - m_p // 250 * m_t)
	if m > v:
		return 'Misha'
	if v > m:
		return 'Vasya'
	return 'Tie'
print(go())


from sys import stdin, stdout
import math, sys
from itertools import permutations, combinations
from collections import defaultdict, deque, OrderedDict
import bisect as bi
import heapq

def I():
	return int(input())

def In():
	return map(int, input().split())

def solve(p, t):
	return max(3 * p / 10, p - p / 250 * t)

def main():
	try:
		(a, b, c, d) = In()
		(t1, t2) = (solve(a, c), solve(b, d))
		if t1 > t2:
			print('Misha')
		elif t1 == t2:
			print('Tie')
		else:
			print('Vasya')
	except:
		pass
M = 998244353
P = 1000000007
for _ in range(1):
	main()


(a, b, c, d) = map(int, input().split())
a1 = 0.3 * a
a2 = a - a / 250 * c
aa = max(a1, a2)
b1 = 0.3 * b
b2 = b - b / 250 * d
bb = max(b1, b2)
if aa > bb:
	print('Misha')
elif aa == bb:
	print('Tie')
elif aa < bb:
	print('Vasya')


(a, b, c, d) = map(int, input().split())
x1 = 3 * a // 10
y1 = a // 250 * c
x2 = 3 * b // 10
y2 = b // 250 * d
s = max(x1, a - y1)
t = max(x2, b - y2)
if s > t:
	print('Misha')
elif s < t:
	print('Vasya')
elif s == t:
	print('Tie')


l = input().split()
if max(3 * int(l[0]) / 10, int(l[0]) - int(l[0]) * int(l[2]) / 250) > max(3 * int(l[1]) / 10, int(l[1]) - int(l[1]) * int(l[3]) / 250):
	print('Misha')
elif max(3 * int(l[0]) / 10, int(l[0]) - int(l[0]) * int(l[2]) / 250) < max(3 * int(l[1]) / 10, int(l[1]) - int(l[1]) * int(l[3]) / 250):
	print('Vasya')
else:
	print('Tie')


(a, b, c, d) = input().split()
a = int(a)
b = int(b)
c = int(c)
d = int(d)
e = max(3 * a / 10, a - a / 250 * c)
f = max(3 * b / 10, b - b / 250 * d)
if e > f:
	print('Misha')
elif f > e:
	print('Vasya')
else:
	print('Tie')


(a, b, c, d) = list(map(int, input().split()))

def sc(p, t):
	return max(p * 3 // 10, p - p * t // 250)
if sc(a, c) == sc(b, d):
	print('Tie')
	exit(0)
print('Misha' if sc(a, c) > sc(b, d) else 'Vasya')


(a, b, c, d) = map(int, input().split())
m = max(0.3 * a, a - a * c / 250)
v = max(0.3 * b, b - b * d / 250)
if not m - v:
	print('Tie')
else:
	print(['Misha', 'Vasya'][v > m])


z = list(map(int, input().split()))
b = [z[0] - z[0] / 250 * z[2], z[0] * 3 / 10]
b.sort()
c = [z[1] - z[1] / 250 * z[3], z[1] * 3 / 10]
c.sort()
if b[-1] > c[-1]:
	print('Misha')
elif b[-1] == c[-1]:
	print('Tie')
else:
	print('Vasya')


(p1, p2, t1, t2) = map(int, input().split())
a = max(3 * p1 / 10, p1 - p1 / 250 * t1)
b = max(3 * p2 / 10, p2 - p2 / 250 * t2)
if a > b:
	print('Misha')
elif b > a:
	print('Vasya')
else:
	print('Tie')


import math, string, itertools, fractions, heapq, collections, re, array, bisect
from itertools import chain, dropwhile, permutations, combinations
from collections import defaultdict

def main(a, b, c, d, info=0):
	i = max(3 * a // 10, a - a // 250 * c)
	j = max(3 * b // 10, b - b // 250 * d)
	if i == j:
		print('Tie')
	elif i > j:
		print('Misha')
	else:
		print('Vasya')

def main_input(info=0):
	(a, b, c, d) = list(map(int, input().split()))
	main(a, b, c, d, info=info)

def __starting_point():
	main_input()
__starting_point()


(a, b, c, d) = map(int, input().split())
s1 = max(3 * a // 10, a - a * c // 250)
s2 = max(3 * b // 10, b - b * d // 250)
if s1 > s2:
	print('Misha')
elif s1 == s2:
	print('Tie')
else:
	print('Vasya')


l = list(map(int, input().split()))
(a, b, c, d) = (l[0], l[1], l[2], l[3])
x = max(int(3 * a / 10), a - int(a * c / 250))
y = max(int(3 * b / 10), b - int(b * d / 250))
if x > y:
	print('Misha')
elif y > x:
	print('Vasya')
else:
	print('Tie')


from sys import stdin, stdout
abcd = list(map(int, stdin.readline().split()))
a = abcd[0]
b = abcd[1]
c = abcd[2]
d = abcd[3]
misha = max(0.3 * a, a - 0.004 * a * c)
vasya = max(0.3 * b, b - 0.004 * b * d)
if misha > vasya:
	stdout.write('Misha')
elif misha == vasya:
	stdout.write('Tie')
else:
	stdout.write('Vasya')


(pM, pV, tM, tV) = list(map(int, input().split()))
misha = max(3 * pM // 10, pM - pM // 250 * tM)
vasya = max(3 * pV // 10, pV - pV // 250 * tV)
if misha == vasya:
	print('Tie')
elif misha > vasya:
	print('Misha')
else:
	print('Vasya')


(a, b, c, d) = map(float, input().split(' '))
r1 = max(3 * a / 10, a - a / 250 * c)
r2 = max(3 * b / 10, b - b / 250 * d)
if r1 > r2:
	print('Misha')
elif r2 > r1:
	print('Vasya')
else:
	print('Tie')


n = list(map(int, input().split()))
Misha = max(3 * n[0] / 10, n[0] - n[0] / 250 * n[2])
Vasya = max(3 * n[1] / 10, n[1] - n[1] / 250 * n[3])
if Misha > Vasya:
	print('Misha')
elif Vasya > Misha:
	print('Vasya')
else:
	print('Tie')


import math, fractions
(a, b, c, d) = [int(x) for x in input().split()]
M = max(3 * a // 10, a - a * c // 250)
V = max(3 * b // 10, b - b * d // 250)
print('Tie' if V == M else 'Vasya' if V > M else 'Misha')


arr = list(map(int, input().split()))
m1 = max(3 * arr[0] / 10, arr[0] - arr[0] * arr[2] / 250)
m2 = max(3 * arr[1] / 10, arr[1] - arr[1] * arr[3] / 250)
m = max(m1, m2)
if m1 == m and m2 == m:
	print('Tie')
elif m1 == m:
	print('Misha')
else:
	print('Vasya')


def points(p, t):
	return max(3 * p / 10, p - p / 250 * t)
(a, b, c, d) = [int(r) for r in input().split()]
p1 = points(a, c)
p2 = points(b, d)
if p1 > p2:
	print('Misha')
elif p1 < p2:
	print('Vasya')
else:
	print('Tie')


(a, b, c, d) = [int(item) for item in input().split()]
x = max(3 * a / 10, a - a * c / 250)
y = max(3 * b / 10, b - b * d / 250)
if x > y:
	print('Misha')
elif x < y:
	print('Vasya')
else:
	print('Tie')


import math
queries = [int(i) for i in input().split()]
misha = queries[0]
vasya = queries[1]
mtime = queries[2]
vtime = queries[3]
maans = max(3 * misha / 10, misha - misha * mtime / 250)
vaans = max(3 * vasya / 10, vasya - vasya * vtime / 250)
if maans > vaans:
	print('Misha')
elif maans == vaans:
	print('Tie')
elif maans < vaans:
	print('Vasya')


def m(p, t):
	return max(3 * p // 10, p - p // 250 * t)
(a, b, c, d) = [int(x) for x in input().split()]
r = m(a, c) - m(b, d)
if r > 0:
	print('Misha')
elif r < 0:
	print('Vasya')
else:
	print('Tie')


(a, b, c, d) = map(int, input().split())
f = lambda p, t: max(3 * p / 10, p - p / 250 * t)
df = f(a, c) - f(b, d)
print('Vasya' if df < 0 else ['Tie', 'Misha'][df > 0])


(a, b, c, d) = map(int, input().split())
n = max(3 * a // 10, a - a // 250 * c)
l = max(3 * b // 10, b - b // 250 * d)
if n == l:
	print('Tie')
elif n > l:
	print('Misha')
else:
	print('Vasya')


def main():
	(a, b, c, d) = map(int, input().split())
	m1 = max(3 * a // 10, a - a * c // 250)
	m2 = max(3 * b // 10, b - b * d // 250)
	if m1 > m2:
		print('Misha')
	elif m1 < m2:
		print('Vasya')
	else:
		print('Tie')
	return
main()


(a, b, c, d) = str(input()).split()
a = int(a)
b = int(b)
c = int(c)
d = int(d)
res_a = max(3 * a // 10, a - a * c // 250)
res_b = max(3 * b // 10, b - b * d // 250)
if res_a > res_b:
	print('Misha')
elif res_a < res_b:
	print('Vasya')
else:
	print('Tie')


(a, b, c, d) = [int(i) for i in input().split()]
a = max(3 * a / 10, a - a / 250 * c)
b = max(3 * b / 10, b - b / 250 * d)
if a > b:
	print('Misha')
elif a < b:
	print('Vasya')
else:
	print('Tie')


x = list(map(int, input().split()))
max_misha = max(3 * x[0] // 10, x[0] - x[0] * x[2] // 250)
max_vasya = max(3 * x[1] // 10, x[1] - x[1] * x[3] // 250)
if max_misha > max_vasya:
	print('Misha')
elif max_vasya > max_misha:
	print('Vasya')
else:
	print('Tie')


import sys
import math
import bisect
import itertools
import random
import re

def query_value(a, t):
	return max(a // 10 * 3, a - a // 250 * t)

def main():
	(a, b, c, d) = map(int, input().split())
	v1 = query_value(a, c)
	v2 = query_value(b, d)
	if v1 > v2:
		print('Misha')
	elif v1 < v2:
		print('Vasya')
	else:
		print('Tie')
main()


(a, b, c, d) = list(map(int, input().split()))

def calc(p, t):
	return max(3 * p // 10, p - p // 250 * t)
if calc(a, c) > calc(b, d):
	print('Misha')
elif calc(a, c) < calc(b, d):
	print('Vasya')
else:
	print('Tie')


def main():
	(a, b, c, d) = map(int, input().split())
	m = max(3 * a / 10, a - a / 250 * c)
	v = max(3 * b / 10, b - b / 250 * d)
	if m > v:
		print('Misha')
	elif v > m:
		print('Vasya')
	else:
		print('Tie')

def __starting_point():
	main()
__starting_point()


from math import *
a = list(map(int, input().split()))
m = max(3 * a[0] / 10, a[0] - a[0] / 250 * a[2])
v = max(3 * a[1] / 10, a[1] - a[1] / 250 * a[3])
if m > v:
	print('Misha')
elif m < v:
	print('Vasya')
else:
	print('Tie')


def f(p, t):
	return p * max(0.3, 1 - 0.004 * t)
(a, b, c, d) = map(int, input().split())
(x, y) = (f(a, c), f(b, d))
print(['Tie', 'Vasya', 'Misha'][(x < y) - (x > y)])


A = input().split()
for i in range(len(A)):
	A[i] = int(A[i])
z = max(3 * A[0] / 10, A[0] - A[0] / 250 * A[2])
h = max(3 * A[1] / 10, A[1] - A[1] / 250 * A[3])
if z > h:
	print('Misha')
elif z < h:
	print('Vasya')
else:
	print('Tie')


def get_points(p, t):
	return max(3 * p // 10, p - t * (p // 250))
s = input().split()
a = int(s[0])
b = int(s[1])
c = int(s[2])
d = int(s[3])
m = get_points(a, c)
v = get_points(b, d)
if m > v:
	print('Misha')
elif m < v:
	print('Vasya')
else:
	print('Tie')


x = input().split()
a = int(x[0])
b = int(x[1])
c = int(x[2])
d = int(x[3])
Misha = max([3 * a / 10, a - a * c / 250])
Vasya = max([3 * b / 10, b - b * d / 250])
if Misha > Vasya:
	print('Misha')
elif Vasya > Misha:
	print('Vasya')
else:
	print('Tie')


def point(p, t):
	return max((3 * p / 10, p - p / 250 * t))
l = list(map(int, input().split()))
M = point(l[0], l[2])
V = point(l[1], l[3])
if V == M:
	print('Tie')
elif V > M:
	print('Vasya')
else:
	print('Misha')


(a, b, c, d) = map(int, input().split())
q = max(3 * a // 10, a - a // 250 * c)
w = max(3 * b // 10, b - b // 250 * d)
if q > w:
	print('Misha')
elif w > q:
	print('Vasya')
else:
	print('Tie')


(a, b, c, d) = input().strip().split(' ')
(a, b, c, d) = [int(a), int(b), int(c), int(d)]
max1 = max(3 * a / 10, a - a / 250 * c)
max2 = max(3 * b / 10, b - b / 250 * d)
if max1 > max2:
	print('Misha')
elif max1 < max2:
	print('Vasya')
else:
	print('Tie')


(a, b, c, d) = input().split()
a = int(a)
b = int(b)
c = int(c)
d = int(d)
mm = max(3 * a / 10, a - a / 250 * c)
vv = max(3 * b / 10, b - b / 250 * d)
if mm < vv:
	print('Vasya')
elif mm == vv:
	print('Tie')
else:
	print('Misha')


digits = input()
listDigits = digits.split()
MishaBalls = int(listDigits[0])
VasyaBalls = int(listDigits[1])
MishaTime = int(listDigits[2])
VasyaTime = int(listDigits[3])

def rezFunc(balls, time):
	rez1 = 3 * balls // 10
	rez2 = balls - balls // 250 * time
	if rez1 > rez2:
		return rez1
	return rez2
rezMisha = rezFunc(MishaBalls, MishaTime)
rezVasya = rezFunc(VasyaBalls, VasyaTime)
if rezMisha > rezVasya:
	print('Misha')
elif rezMisha < rezVasya:
	print('Vasya')
else:
	print('Tie')


(a, b, c, d) = map(int, input().split())
mb = max(3 * a // 10, a - a * c // 250)
vb = max(3 * b // 10, b - b * d // 250)
if mb > vb:
	print('Misha')
elif mb < vb:
	print('Vasya')
else:
	print('Tie')


def point(p, t):
	return max(3 * p / 10, p - p / 250 * t)
(a, b, c, d) = map(int, input().split())
mi = point(a, c)
va = point(b, d)
if mi > va:
	print('Misha')
elif va > mi:
	print('Vasya')
else:
	print('Tie')


(a, b, c, d) = tuple(map(int, input().split()))
misha_points = max(3 * a / 10, a - a / 250 * c)
vasya_points = max(3 * b / 10, b - b / 250 * d)
if misha_points > vasya_points:
	print('Misha')
elif vasya_points > misha_points:
	print('Vasya')
else:
	print('Tie')


(*a,) = map(int, input().split())
(Misha, Vasya) = (max(3 * a[0] // 10, a[0] - a[0] // 250 * a[2]), max(3 * a[1] // 10, a[1] - a[1] // 250 * a[3]))
print('Vasya' if Vasya > Misha else 'Misha' if Misha > Vasya else 'Tie')


(a, b, c, d) = map(int, input().split())
misha_1 = 3 * a / 10
misha_2 = a - a / 250 * c
misha_max = max(misha_1, misha_2)
vasya_1 = 3 * b / 10
vasya_2 = b - b / 250 * d
vasya_max = max(vasya_1, vasya_2)
if misha_max > vasya_max:
	print('Misha')
elif misha_max < vasya_max:
	print('Vasya')
else:
	print('Tie')


l1 = [int(x) for x in input().split()]
(a, b, c, d) = (l1[0], l1[1], l1[2], l1[3])
mScore = max(3 * a / 10, a - a * c / 250)
vScore = max(3 * b / 10, b - b * d / 250)
if mScore > vScore:
	print('Misha')
elif mScore < vScore:
	print('Vasya')
else:
	print('Tie')


score = lambda p, t: p * max(75, 250 - t)
(a, b, c, d) = map(int, input().split())
print('Misha' if score(a, c) > score(b, d) else 'Vasya' if score(a, c) < score(b, d) else 'Tie')


(a, b, c, d) = map(int, input().split())
misha = max(0.3 * a, a - a / 250 * c)
vaysa = max(0.3 * b, b - b / 250 * d)
if misha > vaysa:
	print('Misha')
elif misha < vaysa:
	print('Vasya')
else:
	print('Tie')


s = input('')
l = s.split(' ')
l = list(map(int, l))
m1 = max(3 * l[0] / 10, l[0] - l[0] / 250 * l[2])
m2 = max(3 * l[1] / 10, l[1] - l[1] / 250 * l[3])
if m1 > m2:
	print('Misha')
elif m1 < m2:
	print('Vasya')
else:
	print('Tie')


from sys import stdout, stdin, setrecursionlimit
from io import BytesIO, IOBase
from collections import *
from itertools import *
from random import *
from bisect import *
from string import *
from queue import *
from heapq import *
from math import *
from re import *
from os import *

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = read(self._fd, max(fstat(self._fd).st_size, 8192))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = read(self._fd, max(fstat(self._fd).st_size, 8192))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(stdin, stdout) = (IOWrapper(stdin), IOWrapper(stdout))

def input():
	return stdin.readline().strip()

def fast():
	return stdin.readline().strip()

def zzz():
	return [int(i) for i in fast().split()]
(z, zz) = (fast, lambda : map(int, z().split()))
(szz, graph, mod, szzz) = (lambda : sorted(zz()), {}, 10 ** 9 + 7, lambda : sorted(zzz()))

def lcd(xnum1, xnum2):
	return xnum1 * xnum2 // gcd(xnum1, xnum2)

def output(answer, end='\n'):
	stdout.write(str(answer) + end)
dx = [-1, 1, 0, 0, 1, -1, 1, -1]
dy = [0, 0, 1, -1, 1, -1, -1, 1]
(a, b, c, d) = zzz()

def solve(p, t):
	return max(3 * p / 10, p - p // 250 * t)
ans = solve(a, c)
ans1 = solve(b, d)
if ans > ans1:
	print('Misha')
elif ans < ans1:
	print('Vasya')
else:
	print('Tie')


def points(p, t):
	return max(p // 10 * 3, p - p // 250 * t)

def main():
	[a, b, c, d] = [int(_) for _ in input().split()]
	points_misha = points(a, c)
	points_vasya = points(b, d)
	print('Tie' if points_misha == points_vasya else 'Misha' if points_misha > points_vasya else 'Vasya')
main()


import math
import sys
import collections

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(map(int, input().split()))

def p(a, c):
	return max(3 * a // 10, a - a // 250 * c)
(a, b, c, d) = mi()
if p(a, c) > p(b, d):
	print('Misha')
elif p(a, c) < p(b, d):
	print('Vasya')
else:
	print('Tie')


from sys import stdin, stdout
(a, b, c, d) = [int(x) for x in stdin.readline().rstrip().split()]
misha = max(3 * a / 10, a - a / 250 * c)
vasya = max(3 * b / 10, b - b / 250 * d)
if misha > vasya:
	stdout.write('Misha' + '\n')
elif misha == vasya:
	stdout.write('Tie' + '\n')
else:
	stdout.write('Vasya' + '\n')


a = input()
a = a.split()
a[0] = int(a[0])
a[1] = int(a[1])
a[2] = int(a[2])
a[3] = int(a[3])
max1 = 3 * a[0] / 10
if int(a[0] - a[0] / 250 * a[2]) > max1:
	max1 = a[0] - a[0] / 250 * a[2]
max2 = 3 * a[1] / 10
if a[1] - a[1] / 250 * a[3] > max2:
	max2 = int(a[1] - a[1] / 250 * a[3])
if max1 > max2:
	print('Misha')
if max2 > max1:
	print('Vasya')
if max1 == max2:
	print('Tie')


(a, b, c, d) = list(map(int, input().split()))
m = list(range(2))
v = list(range(2))
m[0] = a * 3 / 10
m[1] = a - a / 250 * c
v[0] = b * 3 / 10
v[1] = b - b / 250 * d
mm = max(m)
vv = max(v)
if mm > vv:
	print('Misha')
elif mm < vv:
	print('Vasya')
else:
	print('Tie')


import sys
from math import *
input = sys.stdin.readline
RI = lambda : [int(x) for x in sys.stdin.readline().strip().split()]
rw = lambda : input().strip().split()
ls = lambda : list(input().strip())
from collections import defaultdict as df
import heapq
infinite = float('inf')
(a, b, c, d) = RI()
s1 = max(3 * a / 10, a - a / 250 * c)
s2 = max(3 * b / 10, b - b / 250 * d)
if s1 > s2:
	print('Misha')
elif s2 > s1:
	print('Vasya')
else:
	print('Tie')


(a, b, c, d) = map(int, input().split())
v1 = max(3 * a // 10, a - a // 250 * c)
v2 = max(3 * b // 10, b - b // 250 * d)
if v1 == v2:
	print('Tie')
else:
	print('Misha' if v1 > v2 else 'Vasya')


(a, b, c, d) = map(int, input().split(' '))
res1 = max(3 * a // 10, a - a // 250 * c)
res2 = max(3 * b // 10, b - b // 250 * d)
print('Vasya' if res1 < res2 else 'Misha' if res1 > res2 else 'Tie')


(p1, p2, t1, t2) = map(int, input().split())
z1 = max(3 * p1 // 10, p1 - p1 / 250 * t1)
z2 = max(3 * p2 // 10, p2 - p2 / 250 * t2)
if z1 > z2:
	print('Misha')
elif z2 > z1:
	print('Vasya')
else:
	print('Tie')


(a, b, c, d) = map(int, input().split())
ee = 3 * a / 10
e = a - a / 250 * c
f = 3 * b / 10
g = b - b / 250 * d
y = max(ee, e)
z = max(f, g)
if y > z:
	print('Misha')
elif z > y:
	print('Vasya')
else:
	print('Tie')


R = lambda : map(int, input().split())
(a, b, c, d) = R()
m = max(3 * a // 10, a - a // 250 * c)
v = max(3 * b // 10, b - b // 250 * d)
if m == v:
	print('Tie')
else:
	print(['Misha', 'Vasya'][m < v])


(a, b, c, d) = map(int, input().split())
ans1 = max(3 * a / 10, a - a / 250 * c)
ans2 = max(3 * b / 10, b - b / 250 * d)
print(['Tie', 'Misha', 'Vasya'][(ans1 > ans2) - (ans1 < ans2)])


def score(p, t):
	return max(int(3 * p / 10), p - int(p / 250) * t)
(a, b, c, d) = map(int, input().split())
s1 = score(a, c)
s2 = score(b, d)
if s1 == s2:
	print('Tie')
elif s1 > s2:
	print('Misha')
else:
	print('Vasya')


from sys import stdin
__author__ = 'artyom'

def calc_points(p, t):
	return max(3 * p // 10, p - p * t // 250)

def read_int_ary():
	return map(int, stdin.readline().strip().split())
(a, b, c, d) = read_int_ary()
m = calc_points(a, c)
v = calc_points(b, d)
print('Misha' if m > v else 'Vasya' if v > m else 'Tie')


string = input()
numbers = string.split(' ')
for x in range(4):
	numbers[x] = int(numbers[x])
a = numbers[0]
b = numbers[1]
c = numbers[2]
d = numbers[3]
values = [a * 3 // 10, a - a // 250 * c]
x = max(values)
values = [b * 3 // 10, b - b // 250 * d]
y = max(values)
if x > y:
	print('Misha')
elif y > x:
	print('Vasya')
else:
	print('Tie')


a = [float(n) for n in input().split()]
temp1 = max(3 * a[0] / 10, a[0] - a[0] * a[2] / 250)
temp2 = max(3 * a[1] / 10, a[1] - a[1] * a[3] / 250)
if temp1 > temp2:
	print('Misha')
elif temp1 == temp2:
	print('Tie')
else:
	print('Vasya')


def Points(P, T):
	return max(3 * P / 10, P - P / 250 * T)
Inpts = list(map(int, input().split()))
if Points(Inpts[0], Inpts[2]) > Points(Inpts[1], Inpts[3]):
	print('Misha')
if Points(Inpts[0], Inpts[2]) < Points(Inpts[1], Inpts[3]):
	print('Vasya')
if Points(Inpts[0], Inpts[2]) == Points(Inpts[1], Inpts[3]):
	print('Tie')


[a, b, c, d] = [int(x) for x in input().split()]
p1 = max(3 * a / 10, a - a / 250 * c)
p2 = max(3 * b / 10, b - b / 250 * d)
if p1 > p2:
	print('Misha')
elif p1 < p2:
	print('Vasya')
else:
	print('Tie')


l = input().split()
a = int(l[0])
b = int(l[1])
c = int(l[2])
d = int(l[3])
misha = max(3 * a / 10, a - a * c / 250)
vasya = max(3 * b / 10, b - b * d / 250)
if misha > vasya:
	print('Misha')
elif misha < vasya:
	print('Vasya')
else:
	print('Tie')


(a, b, c, d) = map(int, input().split())
m = a // 250
n = b // 250
points_misha = max(3 * a / 10, a - m * c)
points_vasya = max(3 * b / 10, b - n * d)
if points_vasya > points_misha:
	print('Vasya')
elif points_misha > points_vasya:
	print('Misha')
else:
	print('Tie')


(a, b, c, d) = map(int, input().split())

def pointsForMisha(a, c):
	ans = max(3 * a / 10, a - a / 250 * c)
	return ans

def pointsForVasya(b, d):
	ans = max(3 * b / 10, b - b / 250 * d)
	return ans
misha = pointsForMisha(a, c)
vasya = pointsForVasya(b, d)
if misha > vasya:
	print('Misha')
elif misha < vasya:
	print('Vasya')
elif misha == vasya:
	print('Tie')


data = input().split()
(A, B, C, D) = (int(data[0]), int(data[1]), int(data[2]), int(data[3]))
misha_scores = max(3 * A / 10, A - A / 250 * C)
vasya_scores = max(3 * B / 10, B - B / 250 * D)
if misha_scores > vasya_scores:
	print('Misha')
elif misha_scores < vasya_scores:
	print('Vasya')
else:
	print('Tie')


import sys
import math
get_string = lambda : sys.stdin.readline().strip()
get_int_list = lambda : list(map(int, sys.stdin.readline().strip().split()))
get_int = lambda : int(sys.stdin.readline().strip())
(a, b, c, d) = get_int_list()
first = max(0.3 * a, a - a * c / 250)
sec = max(0.3 * b, b - b * d / 250)
if first > sec:
	print('Misha')
elif first < sec:
	print('Vasya')
else:
	print('Tie')


import re
from sys import stderr
from typing import Union, Generator, List, Tuple
import string

def main():
	f = lambda p, t: max(3 * p // 10, p - p // 250 * t)
	(a, b, c, d) = map(int, input().split())
	misha_res = f(a, c)
	vasya_res = f(b, d)
	if misha_res == vasya_res:
		res = 'Tie'
	elif misha_res > vasya_res:
		res = 'Misha'
	else:
		res = 'Vasya'
	print(res)
main()


def main():
	(a, b, c, d) = map(int, input().split())
	a_p = int(max(3 * a / 10, a - a / 250 * c))
	b_p = int(max(3 * b / 10, b - b / 250 * d))
	ans = 'Tie'
	if a_p > b_p:
		ans = 'Misha'
	elif a_p < b_p:
		ans = 'Vasya'
	print(ans)
main()


(a, b, c, d) = map(int, input().split())
ca = max(3 * a // 10, a - a // 250 * c)
cb = max(3 * b // 10, b - b // 250 * d)
if ca > cb:
	print('Misha')
elif ca < cb:
	print('Vasya')
else:
	print('Tie')


(a, b, c, d) = map(int, input().split())
z = max(0.3 * a, a - a * c / 250)
x = max(0.3 * b, b - b * d / 250)
if x == z:
	print('Tie')
elif max(z, x) == z:
	print('Misha')
elif max(z, x) == x:
	print('Vasya')


(a, b, c, d) = map(int, input().split())
x = max(3 * a // 10, a - a * c // 250) - max(3 * b // 10, b - b * d // 250)
print('Misha' if x > 0 else 'Vasya' if x < 0 else 'Tie')


(a, b, c, d) = input().split()
a = int(a)
b = int(b)
c = int(c)
d = int(d)

def mx(p, t):
	n = 3 * p / 10
	m = p - p * t / 250
	return max(m, n)
(m, n) = (mx(a, c), mx(b, d))
if m > n:
	print('Misha')
elif m < n:
	print('Vasya')
else:
	print('Tie')


def read():
	inputs = input().strip()
	return list(map(int, inputs.split()))

def read_pair():
	return map(int, input().split(' '))
(a, b, c, d) = read_pair()
p = max(3 * a / 10, a - a / 250 * c)
q = max(3 * b / 10, b - b / 250 * d)
if p > q:
	print('Misha')
elif p < q:
	print('Vasya')
else:
	print('Tie')


(a, b, c, d) = [int(s) for s in input().split()]
M = max(3 * a / 10, a - a / 250 * c)
V = max(3 * b / 10, b - b / 250 * d)
if M > V:
	print('Misha')
elif V > M:
	print('Vasya')
else:
	print('Tie')


def score(p, t):
	return max(3 * p / 10, p - p / 250 * t)
inData = input().split()
numb = [int(x) for x in inData]
mishaRes = score(numb[0], numb[2])
vasyaRes = score(numb[1], numb[3])
if mishaRes == vasyaRes:
	print('Tie')
elif mishaRes > vasyaRes:
	print('Misha')
else:
	print('Vasya')


X = list(map(int, input().split()))
M = max(3 * X[0] // 10, X[0] - X[0] // 250 * X[2])
V = max(3 * X[1] // 10, X[1] - X[1] // 250 * X[3])
if V == M:
	print('Tie')
	exit()
print('Misha' if M > V else 'Vasya')


x = []
x = input().split()
a = int(x[0])
b = int(x[1])
c = int(x[2])
d = int(x[3])
m = []
v = []
p1 = int(3 * a / 10)
p2 = int(a - a * c / 250)
m.append(p1)
m.append(p2)
p1 = int(3 * b / 10)
p2 = int(b - b * d / 250)
v.append(p1)
v.append(p2)
mm = max(m)
mv = max(v)
if mm > mv:
	print('Misha')
elif mm == mv:
	print('Tie')
else:
	print('Vasya')


napis = input().split()
punktyM = int(napis[0])
punktyV = int(napis[1])
czaM = int(napis[2])
czaV = int(napis[3])
maksymalnieMishy = max(3 * punktyM / 10, punktyM - punktyM / 250 * czaM)
maksymalnieVishy = max(3 * punktyV / 10, punktyV - punktyV / 250 * czaV)
if maksymalnieMishy > maksymalnieVishy:
	print('Misha')
elif maksymalnieVishy > maksymalnieMishy:
	print('Vasya')
else:
	print('Tie')


def winner(a, b, c, d):
	x = a - a // 250 * c
	y = b - b // 250 * d
	m = max(0.3 * a, x)
	n = max(0.3 * b, y)
	if m > n:
		print('Misha')
	elif m < n:
		print('Vasya')
	else:
		print('Tie')
(a, b, c, d) = input().split()
(a, b, c, d) = (int(a), int(b), int(c), int(d))
winner(a, b, c, d)


abcd = list(map(int, input().split()))
misha = int(max(3 * abcd[0] / 10, abcd[0] - abcd[0] / 250 * abcd[2]))
vasya = int(max(3 * abcd[1] / 10, abcd[1] - abcd[1] / 250 * abcd[3]))
if misha == vasya:
	print('Tie')
elif misha > vasya:
	print('Misha')
else:
	print('Vasya')


[a, b, t1, t2] = list(map(int, input().split()))
a = max(3 * a // 10, a - a // 250 * t1)
b = max(3 * b // 10, b - b // 250 * t2)
print('Vasya' if a < b else 'Tie' if a == b else 'Misha')


n = list(map(int, input().split()))
[a, b, c, d] = n
ms = max(3 * a / 10, a - a / 250 * c)
vs = max(3 * b / 10, b - b / 250 * d)
if ms > vs:
	print('Misha')
elif ms < vs:
	print('Vasya')
else:
	print('Tie')


line = list(map(int, input().split()))
a = line[0]
b = line[1]
c = line[2]
d = line[3]
m1 = 3 * a / 10
v1 = 3 * b / 10
m2 = a - a / 250 * c
v2 = b - b / 250 * d
m1 = max(m1, m2)
v1 = max(v1, v2)
if m1 > v1:
	print('Misha')
elif m1 == v1:
	print('Tie')
else:
	print('Vasya')


(a, b, c, d) = map(int, input().split())
x1 = max(3 * a / 10, a - a / 250 * c)
x2 = max(3 * b / 10, b - b / 250 * d)
if x1 > x2:
	print('Misha')
elif x2 > x1:
	print('Vasya')
else:
	print('Tie')


def solve(a, b, c, d):
	score = lambda x, y: max(x / 10 * 3, x - x * (y / 250))
	if score(a, c) == score(b, d):
		return 'Tie'
	return 'Misha' if score(a, c) > score(b, d) else 'Vasya'
res = solve(*list(map(int, input().split())))
print(res)


(a, b, c, d) = map(int, input().split(' '))
scoreM = max(3 * a // 10, a - a * c // 250)
scoreV = max(3 * b // 10, b - b * d // 250)
if scoreM > scoreV:
	print('Misha')
elif scoreV > scoreM:
	print('Vasya')
else:
	print('Tie')


l = list(map(int, input().split()))
if max(l[0] - l[0] / 250 * l[2], 3 * l[0] / 10) > max(l[1] - l[1] / 250 * l[3], 3 * l[1] / 10):
	print('Misha')
if max(l[0] - l[0] / 250 * l[2], 3 * l[0] / 10) < max(l[1] - l[1] / 250 * l[3], 3 * l[1] / 10):
	print('Vasya')
if max(l[0] - l[0] / 250 * l[2], 3 * l[0] / 10) == max(l[1] - l[1] / 250 * l[3], 3 * l[1] / 10):
	print('Tie')


(a, b, c, d) = [int(x) for x in input().split()]
Misha_score = max(3 * a / 10, a - a // 250 * c)
Vasya_score = max(3 * b / 10, b - b // 250 * d)
if Misha_score > Vasya_score:
	print('Misha')
elif Vasya_score > Misha_score:
	print('Vasya')
else:
	print('Tie')


s = input()
s = s.split()

def m(a, b):
	return max(3 * a / 10, a - a * b / 250)
for i in range(len(s)):
	s[i] = int(s[i])
if m(s[0], s[2]) > m(s[1], s[3]):
	print('Misha')
elif m(s[0], s[2]) < m(s[1], s[3]):
	print('Vasya')
else:
	print('Tie')


(a, b, c, d) = [int(x) for x in input().split(' ')]
misha = max([3 * a / 10, a - a / 250 * c])
vasya = max([3 * b / 10, b - b / 250 * d])
if misha == vasya:
	print('Tie')
else:
	print('Misha') if misha > vasya else print('Vasya')


(a, b, c, d) = list(map(int, input().split()))
s = max(3 * a // 10, a - a // 250 * c)
t = max(3 * b // 10, b - b // 250 * d)
if s < t:
	print('Vasya')
elif s > t:
	print('Misha')
else:
	print('Tie')


import webbrowser
if True == False:
	url = input()
	while True:
		webbrowser.open(url)
else:
	(a, b, c, d) = [int(i) for i in input().split()]
	m = max(3 * a / 10, a - a / 250 * c)
	v = max(3 * b / 10, b - b / 250 * d)
	if m == v:
		print('Tie')
	elif m > v:
		print('Misha')
	else:
		print('Vasya')


class so_sanh(object):

	def __init__(self, p, t):
		self.p = p
		self.t = t

	def aaa(self):
		if 3 * self.p / 10 < self.p - self.p * self.t / 250:
			return self.p - self.p * self.t / 250
		else:
			return 3 * self.p / 10
(a, b, c, d) = map(int, input().split())
m = so_sanh(a, c)
v = so_sanh(b, d)
if m.aaa() < v.aaa():
	print('Vasya')
elif m.aaa() == v.aaa():
	print('Tie')
else:
	print('Misha')


def points(p, t):
	return max(3 * p // 10, p - p * t // 250)
strings = ['Misha', 'Vasya', 'Tie']
[a, b, c, d] = [int(item) for item in input().split(' ')]
pm = points(a, c)
pv = points(b, d)
if pm > pv:
	print(strings[0])
elif pm < pv:
	print(strings[1])
else:
	print(strings[2])


(ap, bp, am, bm) = map(int, input().split())
x = max(3 * ap // 10, ap - ap // 250 * am)
y = max(3 * bp // 10, bp - bp // 250 * bm)
print('Misha') if x > y else print('Vasya') if y > x else print('Tie')


(p1, p2, t1, t2) = map(int, input().split())
misha = max(3 * p1 // 10, p1 - p1 // 250 * t1)
vasya = max(3 * p2 // 10, p2 - p2 // 250 * t2)
if misha > vasya:
	print('Misha')
elif misha < vasya:
	print('Vasya')
else:
	print('Tie')


(a, b, c, d) = list(map(int, input().split()))
maxmisha = max(3 * a / 10, a - a / 250 * c)
maxvasya = max(3 * b / 10, b - b / 250 * d)
if maxvasya > maxmisha:
	print('Vasya')
elif maxvasya < maxmisha:
	print('Misha')
else:
	print('Tie')


from sys import stdin, stdout

def calc(p, t):
	return max(3.0 * p / 10.0, p - p / 250.0 * t)
(a, b, c, d) = map(int, stdin.readline().strip().split())
m = calc(a, c)
n = calc(b, d)
if m == n:
	stdout.write('Tie\n')
elif m > n:
	stdout.write('Misha\n')
else:
	stdout.write('Vasya\n')


import sys, os
from collections import defaultdict
input = sys.stdin.readline
read = lambda : list(map(int, input().strip().split()))

def f(p, t):
	return max(3 * p // 10, p - p // 250 * t)

def main():
	(a, b, c, d) = read()
	(x, y) = (f(a, c), f(b, d))
	if x > y:
		print('Misha')
	elif x < y:
		print('Vasya')
	else:
		print('Tie')
main()


(a, b, c, d) = input().split()
(a, b, c, d) = (int(a), int(b), int(c), int(d))
a1 = int(max(3 * a / 10, a - a / 250 * c))
b1 = int(max(3 * b / 10, b - b / 250 * d))
if a1 > b1:
	print('Misha')
elif a1 < b1:
	print('Vasya')
else:
	print('Tie')


import sys
[a, b, t1, t2] = list(map(int, sys.stdin.readline().split()))
a = max(3 * a // 10, a - a // 250 * t1)
b = max(3 * b // 10, b - b // 250 * t2)
sys.stdout.write('Vasya' if a < b else 'Tie' if a == b else 'Misha')


(a, b, c, d) = map(int, input().split())
t = max(3 * a / 10, a - a / 250 * c)
t1 = max(3 * b / 10, b - b / 250 * d)
if t > t1:
	print('Misha')
if t < t1:
	print('Vasya')
elif t == t1:
	print('Tie')


t = 1
while t > 0:
	(a, b, c, d) = [int(x) for x in input().split()]
	m = max(3 * a / 10, a - a / 250 * c)
	v = max(3 * b / 10, b - b / 250 * d)
	if m > v:
		print('Misha')
	elif v > m:
		print('Vasya')
	else:
		print('Tie')
	t -= 1


(mp, vp, mc, vc) = [int(x) for x in input().split()]

def Points(p, t):
	MinPt = 3 * p // 10
	MaxPt = p - p // 250 * t
	return max(MinPt, MaxPt)
M = Points(mp, mc)
V = Points(vp, vc)
if M > V:
	print('Misha')
elif M < V:
	print('Vasya')
else:
	print('Tie')


ss = lambda : input()
si = lambda : int(input())
(a, b, c, d) = map(int, input().split())
score = lambda p, t: max(3 * p / 10, p - p / 250 * t)
(misha, vasya) = (score(a, c), score(b, d))
if misha > vasya:
	print('Misha')
elif misha < vasya:
	print('Vasya')
else:
	print('Tie')


scores = list(map(int, input().split(' ')))
m_point = scores[0]
m_time = scores[2]
v_point = scores[1]
v_time = scores[-1]
m_p = 3 * m_point / 10
m_t = m_point - m_point / 250 * m_time
v_p = 3 * v_point / 10
v_t = v_point - v_point / 250 * v_time
m_max = max([m_p, m_t])
v_max = max([v_p, v_t])
if v_max > m_max:
	print('Vasya')
elif m_max > v_max:
	print('Misha')
else:
	print('Tie')


(a, b, c, d) = list(map(int, input().split()))
pm = max(3 * a / 10, a - a / 250 * c)
pv = max(3 * b / 10, b - b / 250 * d)
if pm > pv:
	print('Misha')
elif pv > pm:
	print('Vasya')
elif pv == pm:
	print('Tie')


def pt(p, t):
	return max(3 * p / 10, p - p * t / 250)

def main():
	(a, b, c, d) = [int(x) for x in input().split()]
	(misha, vasya) = (pt(a, c), pt(b, d))
	if misha == vasya:
		print('Tie')
	else:
		print('Misha' if misha > vasya else 'Vasya')
main()


(a, b, c, d) = input().split()
(a, b, c, d) = (int(a), int(b), int(c), int(d))
Max1 = max(3 * a / 10, a - a / 250 * c)
Max2 = max(3 * b / 10, b - b / 250 * d)
if Max1 > Max2:
	print('Misha')
elif Max1 < Max2:
	print('Vasya')
else:
	print('Tie')


import sys
import math
from statistics import mean
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
(a, b, c, d) = invr()
m = max(3 * a / 10, a - a * c / 250)
v = max(3 * b / 10, b - b * d / 250)
if m > v:
	print('Misha')
elif v > m:
	print('Vasya')
else:
	print('Tie')


yo = list(map(int, input().split()))
a = yo[0]
b = yo[1]
c = yo[2]
d = yo[3]
score1 = max(0.3 * a, a - 0.004 * a * c)
score2 = max(0.3 * b, b - 0.004 * b * d)
if score1 > score2:
	print('Misha')
elif score2 > score1:
	print('Vasya')
else:
	print('Tie')


(a, b, c, d) = map(int, input().split())

def pts(p, t):
	return max(3 * p / 10, p - p / 250 * t)
A = pts(a, c)
B = pts(b, d)
if A > B:
	print('Misha')
elif A < B:
	print('Vasya')
else:
	print('Tie')


(mCost, vCost, mTime, vTime) = map(int, input().split())
maxScores = []
maxScores.append(max(3 * mCost / 10, mCost - mCost / 250 * mTime))
maxScores.append(max(3 * vCost / 10, vCost - vCost / 250 * vTime))
if len(set(maxScores)) == 1:
	print('Tie')
elif maxScores.index(max(maxScores)) == 0:
	print('Misha')
else:
	print('Vasya')


(a, b, c, d) = map(int, input().split())
sum1 = max(3 * a / 10, a - a / 250 * c)
sum2 = max(3 * b / 10, b - b / 250 * d)
if sum1 > sum2:
	print('Misha')
elif sum2 > sum1:
	print('Vasya')
else:
	print('Tie')


(a, b, c, d) = [int(x) for x in input().split(' ')]
m = max(3 * a // 10, a - c * (a // 250))
v = max(3 * b // 10, b - d * (b // 250))
if m > v:
	ans = 'Misha'
elif v > m:
	ans = 'Vasya'
else:
	ans = 'Tie'
print(ans)


line = [int(x) for x in input().split()]
(a, b, c, d) = (line[0], line[1], line[2], line[3])
misha = max(a * 3 / 10, a - a / 250 * c)
vasya = max(b * 3 / 10, b - b / 250 * d)
if vasya == misha:
	print('Tie')
elif vasya > misha:
	print('Vasya')
else:
	print('Misha')


(pa, pb, ta, tb) = map(int, input().split(' '))
s1 = [3 * pa / 10, pa - pa / 250 * ta]
s2 = [3 * pb / 10, pb - pb / 250 * tb]
ma = max(s1)
mb = max(s2)
if ma > mb:
	print('Misha')
elif mb > ma:
	print('Vasya')
elif ma == mb:
	print('Tie')


(a, b, c, d) = map(int, input().split())
mi = max(3 * a / 10, a - a / 250 * c)
vi = max(3 * b / 10, b - b / 250 * d)
if mi > vi:
	print('Misha')
elif mi < vi:
	print('Vasya')
else:
	print('Tie')


import math
(a, b, c, d) = map(int, input().split())
if max(3 * a / 10, a - a / 250 * c) > max(3 * b / 10, b - b / 250 * d):
	print('Misha')
elif max(3 * a / 10, a - a / 250 * c) < max(3 * b / 10, b - b / 250 * d):
	print('Vasya')
else:
	print('Tie')


(a, b, c, d) = map(int, input().split())
x1 = 3 * a // 10
y1 = a - a // 250 * c
m = max(x1, y1)
x2 = 3 * b // 10
y2 = b - b // 250 * d
v = max(x2, y2)
if m > v:
	print('Misha')
elif m == v:
	print('Tie')
else:
	print('Vasya')


v = list((int(x) for x in input().split()))
mi = max(3 * v[0] / 10, v[0] - v[0] / 250 * v[2])
va = max(3 * v[1] / 10, v[1] - v[1] / 250 * v[3])
if mi < va:
	print('Vasya')
elif va < mi:
	print('Misha')
else:
	print('Tie')


a = input('').split(' ')
Misha = int(a[0])
Vasya = int(a[1])
MishaTime = int(a[2])
VasyaTime = int(a[3])
VasyaScore = max(3 * Vasya / 10, Vasya - Vasya / 250 * VasyaTime)
MishaScore = max(3 * Misha / 10, Misha - Misha / 250 * MishaTime)
if VasyaScore > MishaScore:
	print('Vasya')
elif MishaScore > VasyaScore:
	print('Misha')
else:
	print('Tie')


m = 'hello'

def score(a, b, c, d):
	ms = max(3 * a / 10, a - a / 250 * c)
	vs = max(3 * b / 10, b - b / 250 * d)
	if ms == vs:
		return 'Tie'
	elif ms > vs:
		return 'Misha'
	else:
		return 'Vasya'
(a, b, c, d) = [int(x) for x in input('').split()]
print(score(a, b, c, d))


import sys
input = sys.stdin.buffer.readline
(a, b, c, d) = map(int, input().split())
m = max(3 * a / 10, a - a // 250 * c)
v = max(3 * b / 10, b - b // 250 * d)
if m == v:
	print('Tie')
elif m > v:
	print('Misha')
else:
	print('Vasya')


(a, b, c, d) = input().split()
a = int(a)
b = int(b)
c = int(c)
d = int(d)
permina = a / 250
perminb = b / 250
permina *= c
perminb *= d
bakia = max(a * 3 / 10, a - permina)
bakib = max(b * 3 / 10, b - perminb)
if bakia < bakib:
	print('Vasya')
elif bakib < bakia:
	print('Misha')
else:
	print('Tie')


a = [int(i) for i in input('').split(' ')]
Misha = max(3 * a[0] / 10, a[0] - a[0] / 250 * a[2])
Vasya = max(3 * a[1] / 10, a[1] - a[1] / 250 * a[3])
if Vasya > Misha:
	print('Vasya')
elif Vasya == Misha:
	print('Tie')
else:
	print('Misha')


(a, b, c, d) = map(int, input().split())
temp1 = max(3 * a // 10, a - a // 250 * c)
temp2 = max(3 * b // 10, b - b // 250 * d)
if temp1 > temp2:
	print('Misha')
elif temp1 < temp2:
	print('Vasya')
else:
	print('Tie')


(a, b, c, d) = [int(i) for i in input().split()]
e = 3 * a // 10
f = a - a // 250 * c
g = 3 * b // 10
h = b - b // 250 * d
i = max(f, e)
j = max(g, h)
if i > j:
	print('Misha')
elif i == j:
	print('Tie')
else:
	print('Vasya')


args = map(int, input().split(' '))
f = lambda p, t: max(3 * p / 10, p - p * t / 250)

def main(a, b, c, d):
	misha = f(a, c)
	vasya = f(b, d)
	if misha == vasya:
		return 'Tie'
	if misha > vasya:
		return 'Misha'
	return 'Vasya'
print(main(*args))


(a, b, c, d) = map(int, input().split())
m = 3.0 * a / 10.0
n = a - a / 250.0 * c
o = 3.0 * b / 10
p = b - b / 250.0 * d
sum = max(m, n)
count = max(o, p)
if sum > count:
	print('Misha')
elif sum < count:
	print('Vasya')
else:
	print('Tie')


(a, b, c, d) = map(int, input().split())
first = max(3 * a / 10, a - a / 250 * c)
second = max(3 * b / 10, b - b / 250 * d)
if first == second:
	print('Tie')
elif first > second:
	print('Misha')
else:
	print('Vasya')


import math
(a, b, c, d) = input().split()
a = int(a)
b = int(b)
c = int(c)
d = int(d)
m1 = 3 * a / 10
n1 = a - a * c / 250
m2 = 3 * b / 10
n2 = b - b * d / 250
v = max(m1, n1)
m = max(m2, n2)
if v < m:
	print('Vasya')
elif v > m:
	print('Misha')
else:
	print('Tie')


liste = input('').split()
M = int(liste[0])
V = int(liste[1])
Mt = int(liste[2])
Vt = int(liste[3])
p1 = max(3 / 10 * M, M - M / 250 * Mt)
p2 = max(3 / 10 * V, V - V / 250 * Vt)
if p1 > p2:
	print('Misha')
elif p2 > p1:
	print('Vasya')
else:
	print('Tie')


row = input().split()
a = int(row[0])
b = int(row[1])
c = int(row[2])
d = int(row[3])
misha = max(3 * a / 10, a - a / 250 * c)
visa = max(3 * b / 10, b - b / 250 * d)
if misha == visa:
	print('Tie')
elif misha > visa:
	print('Misha')
else:
	print('Vasya')


(a, b, c, d) = map(int, input().split())
Misha_score = max(0.3 * a, a - a / 250 * c)
Vasya_score = max(0.3 * b, b - b / 250 * d)
if Misha_score > Vasya_score:
	print('Misha')
elif Misha_score == Vasya_score:
	print('Tie')
else:
	print('Vasya')


def fun(n, m):
	a = n - n / 250 * m
	b = 3 * n / 10
	return max(a, b)
(a, b, c, d) = map(int, input().split())
a_c = fun(a, c)
b_d = fun(b, d)
if a_c > b_d:
	print('Misha')
elif b_d > a_c:
	print('Vasya')
else:
	print('Tie')


def single_integer():
	return int(input())

def multi_integer():
	return map(int, input().split())

def string():
	return input()

def multi_string():
	return input().split()
(a, b, c, d) = multi_integer()
misha_points = max(3 * a / 10, a - a / 250 * c)
vasya_points = max(3 * b / 10, b - b / 250 * d)
if misha_points > vasya_points:
	print('Misha')
elif misha_points == vasya_points:
	print('Tie')
else:
	print('Vasya')


def points(points_in, time):
	points_out = max(3 * points_in / 10, points_in - points_in / 250 * time)
	return points_out
(Misha_points, Vasya_points, Misha_time, Vasya_time) = map(int, input().split())
points_misha = points(Misha_points, Misha_time)
points_vasya = points(Vasya_points, Vasya_time)
if points_misha > points_vasya:
	print('Misha')
elif points_vasya > points_misha:
	print('Vasya')
else:
	print('Tie')


from collections import deque, Counter
import array
from itertools import combinations, permutations
from math import sqrt
import unittest

def read_int():
	return int(input().strip())

def read_int_array():
	return [int(i) for i in input().strip().split(' ')]
(a, b, c, d) = read_int_array()
misha = max(3 * a / 10, a - a // 250 * c)
vasya = max(3 * b / 10, b - b // 250 * d)
print('Misha' if misha > vasya else 'Vasya' if vasya > misha else 'Tie')


import sys
input = sys.stdin.readlines()
input1 = input[0]
input1 = input1.split(' ')
misha_p = int(input1[0])
wasia_p = int(input1[1])
misha_t = int(input1[2])
wasia_t = int(input1[3])

def pattern(points, time):
	result = max(3 * (points / 10), points - points / 250 * time)
	return result
misha_result = pattern(misha_p, misha_t)
wasia_result = pattern(wasia_p, wasia_t)
if misha_result == wasia_result:
	print('Tie')
elif misha_result < wasia_result:
	print('Vasya')
elif misha_result > wasia_result:
	print('Misha')


(a, b, c, d) = map(int, input().split())
P = lambda s, t: max(s * 75, 250 * s - s * t)
x = P(a, c)
y = P(b, d)
print('Misha' if x > y else 'Vasya' if x < y else 'Tie')


n = input().split()
num = [int(i) for i in n]
misha_points = num[0]
vasya_points = num[1]
misha_time = num[2]
vasya_time = num[3]
misha_score = max(0.3 * misha_points, misha_points - misha_points / 250 * misha_time)
vasya_score = max(0.3 * vasya_points, vasya_points - vasya_points / 250 * vasya_time)
if misha_score > vasya_score:
	print('Misha')
elif vasya_score > misha_score:
	print('Vasya')
else:
	print('Tie')


def solve(a, b, c, d):
	if max(3 * a // 10, a - a * c // 250) > max(3 * b // 10, b - b * d // 250):
		return 'Misha'
	elif max(3 * a // 10, a - a * c // 250) < max(3 * b // 10, b - b * d // 250):
		return 'Vasya'
	else:
		return 'Tie'
	return result
(a, b, c, d) = list(map(int, input().strip().split()))
result = solve(a, b, c, d)
print(result)


x = list(map(int, input().split(' ')))
misha = max(3 * x[0] // 10, x[0] - x[0] // 250 * x[2])
vasya = max(3 * x[1] // 10, x[1] - x[1] // 250 * x[3])
if vasya == misha:
	print('Tie')
	exit()
print('Misha' if misha > vasya else 'Vasya')


temp = [int(x) for x in input().split()]
a = temp[0]
b = temp[1]
c = temp[2]
d = temp[3]
x = max(3 * a // 10, a - a // 250 * c)
y = max(3 * b // 10, b - b // 250 * d)
if x > y:
	print('Misha')
elif x == y:
	print('Tie')
else:
	print('Vasya')


(a, b, c, d) = map(int, input().split())
num = max(3 * a // 10, a - a // 250 * c)
num2 = max(3 * b // 10, b - b // 250 * d)
if num > num2:
	print('Misha')
elif num == num2:
	print('Tie')
else:
	print('Vasya')


from sys import stdin, stdout
st = lambda : list(stdin.readline().strip())
li = lambda : list(map(int, stdin.readline().split()))
mp = lambda : map(int, stdin.readline().split())
inp = lambda : int(stdin.readline())
pr = lambda n: stdout.write(str(n) + '\n')
mod = 1000000007

def solve():
	(a, b, c, d) = mp()
	m = max(3 * a // 10, a - a * c // 250)
	v = max(3 * b // 10, b - b * d // 250)
	if v == m:
		pr('Tie')
	elif v > m:
		pr('Vasya')
	else:
		pr('Misha')
for _ in range(1):
	solve()


def main():
	line = input().rstrip().split()
	a = int(line[0])
	b = int(line[1])
	c = int(line[2])
	d = int(line[3])
	mscore = max(3 * a / 10, a - a * c / 250)
	vscore = max(3 * b / 10, b - b * d / 250)
	if mscore > vscore:
		print('Misha')
	elif mscore < vscore:
		print('Vasya')
	else:
		print('Tie')
main()


(a, b, c, d) = map(int, input().split())
n = max(3 * a / 10, a - a / 250 * c)
m = max(3 * b / 10, b - b / 250 * d)
if m < n:
	print('Misha')
if n < m:
	print('Vasya')
if m == n:
	print('Tie')


(a, b, c, d) = list(map(int, input().split()))
tmp1 = max(3 * a // 10, a - a // 250 * c)
tmp2 = max(3 * b // 10, b - b // 250 * d)
print('Tie' if tmp1 == tmp2 else 'Misha' if tmp1 > tmp2 else 'Vasya')


def point(p, t):
	return max(3 * p / 10, p - p / 250 * t)
(a, b, c, d) = map(int, input().split())
count1 = 0
count2 = 0
count1 = point(a, c)
count2 = point(b, d)
if count1 > count2:
	print('Misha')
elif count1 == count2:
	print('Tie')
else:
	print('Vasya')


def contest(a, b, c, d):
	m = max(3 * a / 10, a - a / 250 * c)
	v = max(3 * b / 10, b - b / 250 * d)
	if m == v:
		return 'Tie'
	if m > v:
		return 'Misha'
	return 'Vasya'
(a, b, c, d) = list(map(int, input().rstrip().split()))
print(contest(a, b, c, d))


import sys, itertools, math

def ia():
	return [int(i) for i in sys.stdin.readline().strip().split(' ')]

def ii():
	return int(sys.stdin.readline().strip())
(a, b, c, d) = ia()

def score(p, t):
	return max(3 * p / 10, p - p / 250 * t)
if score(a, c) > score(b, d):
	print('Misha')
elif score(a, c) < score(b, d):
	print('Vasya')
else:
	print('Tie')


(pm, pv, tm, tv) = map(int, input().split())
v = max(3 * pv / 10, pv - pv / 250 * tv)
m = max(3 * pm / 10, pm - pm / 250 * tm)
if m > v:
	print('Misha')
if v > m:
	print('Vasya')
if v == m:
	print('Tie')


(a, b, c, d) = map(int, input().split())
p1 = max(3 * a / 10, a - a * c / 250)
p2 = max(3 * b / 10, b - b * d / 250)
if p1 == p2:
	print('Tie')
	exit(0)
print(['Misha', 'Vasya'][p1 < p2])


t = [int(i) for i in input().split()]
m = max(3 * t[0] / 10, t[0] - t[0] / 250 * t[2])
v = max(3 * t[1] / 10, t[1] - t[1] / 250 * t[3])
if v == m:
	print('Tie')
elif v > m:
	print('Vasya')
else:
	print('Misha')


(a, b, c, d) = list(map(int, input().split()))
Mis = max(3 * a / 10, a - a / 250 * c)
Vas = max(3 * b / 10, b - b / 250 * d)
if Mis > Vas:
	print('Misha')
elif Mis < Vas:
	print('Vasya')
else:
	print('Tie')


(a, b, c, d) = list(map(int, input().split()))
x = lambda p, t: max(3 * p / 10, p - p / 250 * t)
m = x(a, c)
v = x(b, d)
print('Misha' if m > v else 'Tie' if m == v else 'Vasya')


x = list(map(int, input().split()))
a = max(3 * x[0] / 10, x[0] - x[0] / 250 * x[2])
b = max(3 * x[1] / 10, x[1] - x[1] / 250 * x[3])
if a > b:
	print('Misha')
elif b > a:
	print('Vasya')
else:
	print('Tie')


(a, b, c, d) = map(int, input().split())
p_m = max(3 / 10 * a, a - a / 250 * c)
p_v = max(3 / 10 * b, b - b / 250 * d)
if p_m > p_v:
	print('Misha')
elif p_m < p_v:
	print('Vasya')
else:
	print('Tie')


(p1, p2, t1, t2) = map(int, input().split())
m = max(3 * p1 / 10, p1 - p1 / 250 * t1)
v = max((3 * p2 / 10, p2 - p2 / 250 * t2))
print(['Misha', 'Vasya', 'Tie'][[m > v, v > m, v == m].index(1)])


a = list(map(int, input().split()))
b = max(a[0] * 0.3, a[0] * (1 - a[2] * 0.004))
c = max(a[1] * 0.3, a[1] * (1 - a[3] * 0.004))
print('Misha' if b > c else 'Tie' if b == c else 'Vasya')


(p1, p2, t1, t2) = map(int, input().split())
M = max(3 * p1 / 10, p1 - p1 / 250 * t1)
V = max(3 * p2 / 10, p2 - p2 / 250 * t2)
if V > M:
	print('Vasya')
elif V < M:
	print('Misha')
else:
	print('Tie')


a = input().split()
b = int(a[0])
c = int(a[1])
d = int(a[2])
e = int(a[3])
r = 3 * b // 10
y = b - b // 250 * d
x = max(r, y)
f = 3 * c // 10
q = c - c // 250 * e
z = max(f, q)
if x > z:
	print('Misha')
elif x < z:
	print('Vasya')
else:
	print('Tie')


(a, b, c, d) = map(int, input().split())
f = 2
res = ['Misha', 'Vasya', 'Tie']
f = lambda p, t: max(3 * p // 10, p - p // 250 * t)
(q, w) = (f(a, c), f(b, d))
if q == w:
	print(res[2])
elif q > w:
	print(res[0])
else:
	print(res[1])


(a, b, c, d) = map(int, input().split())
sa = max(3 * a // 10, a - a // 250 * c)
sb = max(3 * b // 10, b - b // 250 * d)
if sa > sb:
	print('Misha')
elif sa < sb:
	print('Vasya')
else:
	print('Tie')


(a, b, c, d) = map(int, input().split())

def points(p, t):
	return max(3 * p / 10, p - p * t / 250)
misha_pts = points(a, c)
vasya_pts = points(b, d)
if misha_pts > vasya_pts:
	print('Misha')
elif misha_pts < vasya_pts:
	print('Vasya')
else:
	print('Tie')


T_ON = 0
DEBUG_ON = 0
MOD = 998244353

def solve():

	def cal(p, t):
		return max(3 * p // 10, p - p // 250 * t)
	(a, b, c, d) = read_ints()
	x = cal(a, c)
	y = cal(b, d)
	if x > y:
		print('Misha')
	elif x < y:
		print('Vasya')
	else:
		print('Tie')

def main():
	T = read_int() if T_ON else 1
	for i in range(T):
		solve()

def debug(*xargs):
	if DEBUG_ON:
		print(*xargs)
from collections import *
import math
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def read_int():
	return int(input())

def read_ints():
	return list(map(int, input().split()))

def print_nums(nums):
	print(' '.join(map(str, nums)))

def YES():
	print('YES')

def Yes():
	print('Yes')

def NO():
	print('NO')

def No():
	print('No')

def First():
	print('First')

def Second():
	print('Second')

def fib(n):
	(a, b) = (0, 1)
	for _ in range(n):
		(a, b) = (b, a + b)
	return a

def fib_ns(n):
	assert n >= 1
	f = [0 for _ in range(n + 1)]
	f[0] = 0
	f[1] = 1
	for i in range(2, n + 1):
		f[i] = f[i - 1] + f[i - 2]
	return f

def fib_to_n(n):
	f = []
	(a, b) = (0, 1)
	while a <= n:
		f.append(a)
		(a, b) = (b, a + b)
	return f

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def xgcd(a, b):
	(x0, x1, y0, y1) = (0, 1, 1, 0)
	while a != 0:
		((q, a), b) = (divmod(b, a), a)
		(y0, y1) = (y1, y0 - q * y1)
		(x0, x1) = (x1, x0 - q * x1)
	return (b, x0, y0)

def lcm(a, b):
	d = gcd(a, b)
	return a * b // d

def is_even(x):
	return x % 2 == 0

def is_odd(x):
	return x % 2 == 1

def modinv(a, m):
	(g, x, _) = xgcd(a, m)
	if g != 1:
		raise Exception('gcd(a, m) != 1')
	return x % m

def mod_add(x, y):
	x += y
	while x >= MOD:
		x -= MOD
	while x < 0:
		x += MOD
	return x

def mod_mul(x, y):
	return x * y % MOD

def mod_pow(x, y):
	if y == 0:
		return 1
	if y % 2:
		return mod_mul(x, mod_pow(x, y - 1))
	p = mod_pow(x, y // 2)
	return mod_mul(p, p)

def mod_inv(y):
	return mod_pow(y, MOD - 2)

def mod_div(x, y):
	return mod_mul(x, mod_inv(y))

def is_prime(n):
	if n == 1:
		return False
	for i in range(2, int(n ** 0.5) + 1):
		debug(n, i)
		if n % i == 0:
			return False
	return True

def gen_primes(n):
	P = [True for _ in range(n + 1)]
	P[0] = P[1] = False
	for i in range(int(n ** 0.5) + 1):
		if P[i]:
			for j in range(2 * i, n + 1, i):
				P[j] = False
	return P

def is_lucky(n):
	return set(list(str(n))).issubset({'4', '7'})
main()


z = list(map(int, input().split()))
x = max(3 * z[0] / 10, z[0] - z[0] / 250 * z[2])
c = max(3 * z[1] / 10, z[1] - z[1] / 250 * z[3])
if c == x:
	print('Tie')
else:
	print(['Vasya', 'Misha'][x > c])


t = [int(x) for x in input().split()]
a = t[0]
b = t[1]
c = t[2]
d = t[3]
t1 = max(3 * a // 10, a - a / 250 * c)
t2 = max(3 * b // 10, b - b / 250 * d)
if t1 == t2:
	print('Tie')
elif t1 > t2:
	print('Misha')
else:
	print('Vasya')


(a, b, c, d) = map(int, input().split())
r = 3 * a // 10
t = a - a // 250 * c
m = max(r, t)
r1 = 3 * b // 10
t1 = b - b // 250 * d
v = max(r1, t1)
if m > v:
	print('Misha')
elif v > m:
	print('Vasya')
elif v == m:
	print('Tie')


def point(p, t):
	if p % 250 == 0:
		score1 = 3 * p / 10
		score2 = p - p * t / 250
		score = max(score1, score2)
		return score
	else:
		return False

def Convert(string):
	li = list(string.split(' '))
	return li
scores = input()
List = Convert(scores)
List = list(map(int, List))
a = List[0]
b = List[1]
c = List[2]
d = List[3]
Misha = point(a, c)
Vasya = point(b, d)
if a <= 3500 and a >= 250 and (b <= 3500) and (b >= 250) and (c <= 180) and (c >= 0) and (d <= 180) and (d >= 0):
	if Misha > Vasya:
		print('Misha')
	elif Misha < Vasya:
		print('Vasya')
	else:
		print('Tie')


(a, b, c, d) = map(int, input().strip().split()[:4])
l1 = max(3 * a / 10, a - a * c / 250)
l2 = max(3 * b / 10, b - b * d / 250)
if l1 > l2:
	print('Misha')
elif l2 > l1:
	print('Vasya')
else:
	print('Tie')


str = input()
num = [n for n in str.split()]
a = int(num[0])
b = int(num[1])
c = int(num[2])
d = int(num[3])
mm = max(3 * a / 10, a - a / 250 * c)
vv = max(3 * b / 10, b - b / 250 * d)
if mm < vv:
	print('Vasya')
elif mm == vv:
	print('Tie')
else:
	print('Misha')


import sys
import math as m

def main():
	pass

def binary(n):
	return bin(n).replace('0b', '')

def decimal(s):
	return int(s, 2)

def pow2(n):
	p = 0
	while n > 1:
		n //= 2
		p += 1
	return p

def isPrime(n):
	if n == 1:
		return False
	else:
		root = int(n ** 0.5)
		root += 1
		for i in range(2, root):
			if n % i == 0:
				return False
		return True

def lts(l):
	s = ''.join(map(str, l))
	return s

def stl(s):
	l = list(s)
	return l

def sq(a, target, arr=[]):
	s = sum(arr)
	if s == target:
		return arr
	if s >= target:
		return
	for i in range(len(a)):
		n = a[i]
		remaining = a[i + 1:]
		ans = sq(remaining, target, arr + [n])
		if ans:
			return ans
mod = int(1000000000.0) + 7

def sinp():
	return sys.stdin.readline().strip()

def iinp():
	return int(input())

def ninp():
	return map(int, sys.stdin.readline().strip().split())

def llinp():
	return list(map(int, sys.stdin.readline().strip().split()))

def p(xyz):
	print(xyz)

def p2(a, b):
	print(a, b)
(a, b, c, d) = ninp()
m1 = max(3 * a / 10, a - a / 250 * c)
m2 = max(3 * b / 10, b - b / 250 * d)
if m1 == m2:
	print('Tie')
elif m1 > m2:
	print('Misha')
else:
	print('Vasya')


(a, b, c, d) = list(map(int, input().split(' ')))
s = max(a * 3 / 10, a - a / 250 * c)
s1 = max(b * 3 / 10, b - b / 250 * d)
if s > s1:
	print('Misha')
if s < s1:
	print('Vasya')
if s == s1:
	print('Tie')


(a, b, c, d) = list(map(int, input().split()))
m_p = max(3 * a / 10, a - a / 250 * c)
v_p = max(3 * b / 10, b - b / 250 * d)
if a == b and c == d:
	print('Tie')
elif m_p > v_p:
	print('Misha')
elif m_p < v_p:
	print('Vasya')
else:
	print('Tie')


__author__ = 'Rakshak.R.Hegde'
(a, b, c, d) = map(int, input().split())
pA = max(3 * a // 10, a - a * c // 250)
pB = max(3 * b // 10, b - b * d // 250)
if pA == pB:
	print('Tie')
else:
	print('Misha' if pA > pB else 'Vasya')


p = input().split()
a = int(p[0])
b = int(p[1])
c = int(p[2])
d = int(p[3])
ms = max(a * 3 // 10, a - a // 250 * c)
vs = max(b * 3 // 10, b - b // 250 * d)
if ms > vs:
	print('Misha')
elif vs > ms:
	print('Vasya')
else:
	print('Tie')


data = [int(k) for k in input().split()]
Misha = max(3 * data[0] / 10, data[0] - data[0] / 250 * data[2])
Vasya = max(3 * data[1] / 10, data[1] - data[1] / 250 * data[3])
if Misha == Vasya:
	print('Tie')
elif Misha > Vasya:
	print('Misha')
else:
	print('Vasya')


(a, b, c, d) = map(int, input().split())
a_points = max(3 * a // 10, a - a // 250 * c)
b_points = max(3 * b // 10, b - b // 250 * d)
if a_points > b_points:
	print('Misha')
elif b_points > a_points:
	print('Vasya')
elif a_points == b_points:
	print('Tie')


(a, b, c, d) = map(int, input().split())
y1 = max(3 * a // 10, a - a // 250 * c)
y2 = max(3 * b // 10, b - b // 250 * d)
if y1 > y2:
	print('Misha')
elif y1 < y2:
	print('Vasya')
elif y1 == y2:
	print('Tie')


(a, b, c, d) = map(int, input().split())
mx_m = max(3 * a // 10, a - a // 250 * c)
mx_v = max(3 * b // 10, b - b // 250 * d)
if mx_m == mx_v:
	print('Tie')
elif mx_m > mx_v:
	print('Misha')
else:
	print('Vasya')


import sys
inf = float('inf')
(mod, MOD) = (1000000007, 998244353)

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def input():
	return sys.stdin.readline().strip()
(a, b, c, d) = get_ints()
if c == 0:
	A = 3 * a / 10
else:
	A = max(3 * a / 10, a - a / 250 * c)
if d == 0:
	B = 3 * b / 10
else:
	B = max(3 * b / 10, b - b / 250 * d)
if A > B:
	print('Misha')
elif B > A:
	print('Vasya')
else:
	print('Tie')


nt = list(map(int, input().split()))
m = max(3 * nt[0] // 10, nt[0] - nt[0] // 250 * nt[2])
v = max(3 * nt[1] // 10, nt[1] - nt[1] // 250 * nt[3])
if v > m:
	print('Vasya')
if v < m:
	print('Misha')
if v == m:
	print('Tie')


(a, b, c, d) = list(map(int, input('').split()))
z1 = max(3 * a / 10, a - a / 250 * c)
z2 = max(3 * b / 10, b - b / 250 * d)
if z1 < z2:
	print('Vasya')
elif z1 == z2:
	print('Tie')
else:
	print('Misha')


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
readint = lambda : int(sys.stdin.readline().rstrip('\r\n'))
readints = lambda : map(int, sys.stdin.readline().rstrip('\r\n').split())
readstr = lambda : sys.stdin.readline().rstrip('\r\n')
readstrs = lambda : map(str, sys.stdin.readline().rstrip('\r\n').split())
readarri = lambda : [int(_) for _ in sys.stdin.readline().rstrip('\r\n').split()]
readarrs = lambda : [str(_) for _ in sys.stdin.readline().rstrip('\r\n').split()]

def solve():
	(a, b, c, d) = readints()
	calc = lambda p, t: max(3 * p // 10, p - p * t // 250)
	misha = calc(a, c)
	vasya = calc(b, d)
	if misha > vasya:
		print('Misha')
	elif misha < vasya:
		print('Vasya')
	else:
		print('Tie')

def main():
	t = 1
	for _ in range(t):
		solve()
main()


temp = list(map(int, input().split()))
a = temp[0]
b = temp[1]
c = temp[2]
d = temp[3]
misha_score = int(a * 3 / 10)
vasya_score = int(b * 3 / 10)
if misha_score < a - int(a * c / 250):
	misha_score = a - int(a * c / 250)
if vasya_score < b - int(b * d / 250):
	vasya_score = b - int(b * d / 250)
if vasya_score > misha_score:
	print('Vasya')
elif misha_score > vasya_score:
	print('Misha')
else:
	print('Tie')


def get_point(p, t):
	points = max(3 * p / 10, p - p / 250 * t)
	return points

def get_input():
	(a, b, c, d) = input().split()
	a = int(a)
	b = int(b)
	c = int(c)
	d = int(d)
	return (a, b, c, d)

def main():
	(a, b, c, d) = get_input()
	Misha_points = get_point(a, c)
	Vasya_points = get_point(b, d)
	if Misha_points > Vasya_points:
		print('Misha')
	if Vasya_points > Misha_points:
		print('Vasya')
	if Vasya_points == Misha_points:
		print('Tie')
main()


params = input().split(' ')
misha = max(3 * int(params[0]) / 10, int(params[0]) - int(params[0]) / 250 * int(params[2]))
vasya = max(3 * int(params[1]) / 10, int(params[1]) - int(params[1]) / 250 * int(params[3]))
if misha == vasya:
	print('Tie')
elif misha > vasya:
	print('Misha')
elif vasya > misha:
	print('Vasya')


data = [int(x) for x in input().split()]
msc = max(3 * data[0] / 10, data[0] - data[0] * data[2] / 250)
vsc = max(3 * data[1] / 10, data[1] - data[1] * data[3] / 250)
if vsc > msc:
	print('Vasya')
elif msc > vsc:
	print('Misha')
else:
	print('Tie')


def points(score, time):
	return max(3 * score / 10, score - time * score / 250)
(a, b, c, d) = [int(i) for i in input().split()]
if points(b, d) > points(a, c):
	print('Vasya')
elif points(b, d) < points(a, c):
	print('Misha')
else:
	print('Tie')


def points(p, t):
	return max(3 * p / 10, p - p / 250 * t)
(a, b, c, d) = [int(i) for i in input().split()]
print('Misha' if points(a, c) > points(b, d) else 'Tie' if points(a, c) == points(b, d) else 'Vasya')


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def main():
	(a, b, c, d) = LI()
	t = max(a * 3 / 10, a - a / 250 * c)
	u = max(b * 3 / 10, b - b / 250 * d)
	if t == u:
		return 'Tie'
	if t > u:
		return 'Misha'
	return 'Vasya'
print(main())


def jud(a, b):
	if a > b:
		print('Misha')
	elif a == b:
		print('Tie')
	else:
		print('Vasya')
l = input().split()
p1 = float(l[0])
p2 = float(l[1])
t1 = float(l[2])
t2 = float(l[3])
jud(max(3 * p1 / 10, p1 - p1 * t1 / 250), max(3 * p2 / 10, p2 - p2 * t2 / 250))


(a, b, c, d) = list(map(int, input().split(' ')))
x1 = 3 * a // 10
x2 = 3 * b // 10
y1 = a - a // 250 * c
y2 = b - b // 250 * d
z1 = max(x1, y1)
z2 = max(x2, y2)
if a % 250 == 0 and b % 250 == 0:
	if z1 > z2:
		print('Misha')
	elif z1 == z2:
		print('Tie')
	else:
		print('Vasya')
exit()


(a, b, c, d) = map(int, input().split())
misha_point = max(3 * a / 10, a - a * c / 250)
vasya_point = max(3 * b / 10, b - b * d / 250)
if misha_point == vasya_point:
	print('Tie')
elif misha_point > vasya_point:
	print('Misha')
elif misha_point < vasya_point:
	print('Vasya')


a = [int(x) for x in input().split()]
b = max(a[0] * 3 / 10, a[0] - a[0] / 250 * a[2])
c = max(a[1] * 3 / 10, a[1] - a[1] / 250 * a[3])
if b > c:
	print('Misha')
elif b < c:
	print('Vasya')
elif b == c:
	print('Tie')


(x, a, y, c) = [int(i) for i in input().split()]
z = max(x * 0.3, x - x / 250 * y)
b = max(a * 0.3, a - a / 250 * c)
if z > b:
	print('Misha')
elif b > z:
	print('Vasya')
else:
	print('Tie')


import math
from collections import Counter
from collections import Counter

def solve():
	(a, b, c, d) = list(map(int, input().split()))
	pt1 = max(3 * a // 10, a - a // 250 * c)
	pt2 = max(3 * b // 10, b - b // 250 * d)
	if pt1 > pt2:
		return 'Misha'
	if pt1 == pt2:
		return 'Tie'
	return 'Vasya'
print(solve())


st = [int(i) for i in input().split(' ')]
a = st[0]
b = st[1]
c = st[2]
d = st[3]
n1 = max(3 * a / 10, a - a / 250 * c)
n2 = max(3 * b / 10, b - b / 250 * d)
if n1 > n2:
	print('Misha')
elif n1 < n2:
	print('Vasya')
else:
	print('Tie')


(a, b, c, d) = map(int, input().split())
(ans, res) = (0, 0)
temp = max(3 * a / 10, a - a / 250 * c)
res = max(3 * b / 10, b - b / 250 * d)
if temp == res:
	print('Tie')
elif temp < res:
	print('Vasya')
else:
	print('Misha')


def res(cost, time):
	return max(3 * cost // 10, cost - cost // 250 * time)
(a, b, c, d) = map(int, input().split())
if res(a, c) > res(b, d):
	print('Misha')
elif res(a, c) == res(b, d):
	print('Tie')
else:
	print('Vasya')


(a, b, c, d) = map(int, input().split())
e = 3 * a / 10
f = 3 * b / 10
g = a - a / 250 * c
h = b - b / 250 * d
s1 = max(3 * a / 10, a - a * c / 250)
s2 = max(3 * b / 10, b - b * d / 250)
if s1 > s2:
	print('Misha')
elif s1 == s2:
	print('Tie')
else:
	print('Vasya')


(a, b, c, d) = list(map(int, input().split()))
k1 = max(3 * a // 10, a - a // 250 * c)
k2 = max(3 * b // 10, b - b // 250 * d)
if k1 > k2:
	print('Misha')
elif k1 == k2:
	print('Tie')
else:
	print('Vasya')


def kontest(lst):
	m1 = max(3 * lst[0] / 10, lst[0] - lst[0] / 250 * lst[2])
	m2 = max(3 * lst[1] / 10, lst[1] - lst[1] / 250 * lst[3])
	if m1 > m2:
		return 'Misha'
	elif m1 < m2:
		return 'Vasya'
	else:
		return 'Tie'
a = [int(i) for i in input().split()]
print(kontest(a))


(a, b, c, d) = map(int, input().split())
f = max(0.3 * a, a - a / 250 * c)
s = max(0.3 * b, b - b / 250 * d)
if f > s:
	print('Misha')
elif s > f:
	print('Vasya')
else:
	print('Tie')


(misha, vaysa, m, v) = map(int, input().split())

def formula(points, time):
	return max(3 * points / 10, points - points / 250 * time)
first = formula(misha, m)
second = formula(vaysa, v)
if first > second:
	print('Misha')
elif second > first:
	print('Vasya')
else:
	print('Tie')


import math

def formula(p, t):
	first = 3 * p / 10
	second = p - p / 250 * t
	return max(first, second)
(a, b, c, d) = map(int, input().split())
first = formula(a, c)
second = formula(b, d)
if first > second:
	print('Misha')
elif second > first:
	print('Vasya')
else:
	print('Tie')


import sys
import math
(a, b, c, d) = [int(x) for x in sys.stdin.readline().split()]
vmax1 = max(3 * a / 10, a - a / 250 * c)
vmax2 = max(3 * b / 10, b - b / 250 * d)
if vmax1 > vmax2:
	print('Misha')
elif vmax1 < vmax2:
	print('Vasya')
else:
	print('Tie')


input_a = input().split()
misha = int(input_a[0])
vasya = int(input_a[1])
misha_time = int(input_a[2])
vasya_time = int(input_a[3])
misha_total = max(misha * 3 / 10, misha - misha / 250 * misha_time)
vasya_total = max(vasya * 3 / 10, vasya - vasya / 250 * vasya_time)
if misha_total > vasya_total:
	print('Misha')
elif misha_total == vasya_total:
	print('Tie')
else:
	print('Vasya')


R = lambda : map(int, input().split())
(a, b, c, d) = R()
misha = max(3 * a // 10, a - a // 250 * c)
vasha = max(3 * b // 10, b - b // 250 * d)
if misha > vasha:
	print('Misha')
elif vasha > misha:
	print('Vasya')
else:
	print('Tie')


(a, b, c, d) = input().split()
(a, b, c, d) = (int(a), int(b), int(c), int(d))
mishaScore = max(3 * a / 10, a - a * c / 250)
vasyaScore = max(3 * b / 10, b - b * d / 250)
if mishaScore > vasyaScore:
	print('Misha')
elif vasyaScore > mishaScore:
	print('Vasya')
else:
	print('Tie')


vvod = input()
vvod_list = vvod.split(' ')
a = vvod_list[0]
b = vvod_list[1]
c = vvod_list[2]
d = vvod_list[3]
i = max(3 * float(a) // 10, float(a) - float(a) // 250 * float(c))
j = max(3 * float(b) // 10, float(b) - float(b) // 250 * float(d))
if i > j:
	print('Misha')
elif i == j:
	print('Tie')
else:
	print('Vasya')


from sys import stderr

def readint():
	return int(input())

def readfloat():
	return float(input())

def readarray(n, f=input):
	return [f() for i in range(n)]

def readlinearray(f=int):
	return list(map(f, input().split()))

def euclide(a, b):
	if a < 0:
		(g, x, y) = euclide(-a, b)
		return (g, -x, y)
	if b < 0:
		(g, x, y) = euclide(a, -b)
		return (g, x, -y)

def gen_primes(max):
	primes = [1] * (max + 1)
	for i in range(2, max + 1):
		if primes[i]:
			for j in range(i + i, max + 1, i):
				primes[j] = 0
	primes[0] = 0
	return [x for x in range(max + 1) if primes[x]]

def is_prime(N):
	if N % 2 == 0:
		return N == 2
	i = 3
	while i * i <= N:
		if N % i == 0:
			return False
		i += 2
	return True

def answer():
	return ''

def gcj():
	case_number = readint()
	for case in range(case_number):
		print('Case #%s: %s' % (case + 1, str(answer)))
(a, b, c, d) = readlinearray()
m = max(3 * a // 10, a - a // 250 * c)
v = max(3 * b // 10, b - b // 250 * d)
if m > v:
	print('Misha')
elif m < v:
	print('Vasya')
else:
	print('Tie')


inputer = input()
inp = inputer.split()
inp = [int(x) for x in inp]

def point(p, t):
	return max(3 * p / 10, p - p / 250 * t)
mp = point(inp[0], inp[2])
vp = point(inp[1], inp[3])
if mp > vp:
	print('Misha')
elif mp < vp:
	print('Vasya')
else:
	print('Tie')


n = input().split()
sMisha = int(n[0])
sVasha = int(n[1])
tMisha = int(n[2])
tVasha = int(n[3])

def score(s, t):
	p = max(3 * s // 10, s - s // 250 * t)
	return p
pMisha = score(sMisha, tMisha)
pVasha = score(sVasha, tVasha)
if pMisha < pVasha:
	print('Vasya')
elif pMisha > pVasha:
	print('Misha')
else:
	print('Tie')


(a, b, c, d) = [int(_) for _ in input().split()]
X = max(3 * a / 10, a - a * c / 250)
Y = max(3 * b / 10, b - b * d / 250)
if X < Y:
	print('Vasya')
elif X > Y:
	print('Misha')
else:
	print('Tie')


n = input().split()
a = int(n[0])
b = int(n[1])
c = int(n[2])
d = int(n[3])
m = max(3 * a / 10, a - a / 250 * c)
v = max(3 * b / 10, b - b / 250 * d)
if m > v:
	print('Misha')
elif v > m:
	print('Vasya')
else:
	print('Tie')


def maxx(x, y):
	if x > y:
		return x
	else:
		return y
size = str(input()).split(' ')
a = int(size[0])
b = int(size[1])
c = int(size[2])
d = int(size[3])
s1 = maxx(3 * a / 10, a - a / 250 * c)
s2 = maxx(3 * b / 10, b - b / 250 * d)
if s1 > s2:
	print('Misha')
elif s1 < s2:
	print('Vasya')
else:
	print('Tie')


(a, b, c, d) = map(int, input().split())
pt1 = max(3 * a / 10, a - a * c / 250)
pt2 = max(3 * b / 10, b - b * d / 250)
if pt1 > pt2:
	print('Misha')
elif pt2 > pt1:
	print('Vasya')
else:
	print('Tie')