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: interview

Starter code:

Solutions:
a,b,c,d=list(map(int,input().split()))
misha=max(3*a/10,a-a/250*c)
vasya=max(3*b/10,b-b/250*d)

if misha > vasya:
    print("Misha")
elif vasya > misha:
    print("Vasya")
else:
    print("Tie")


#!/usr/bin/env python3
# -*- coding: utf-8 -*-

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

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

ret = ""
if m > v:
    ret = "Misha"
elif v > m:
    ret = "Vasya"
else:
    ret = "Tie"

print(ret)



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()))
    #t = [(int(x)-1,i+1) for i,x in enumerate(input().split())]
    main(a,b,c,d,info=info)

def __starting_point():
    main_input()

__starting_point()

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


#!/usr/bin/env python3

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")



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 = 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 v > m:
    print('Vasya')
else:
    print('Tie')


__author__ = 'Rakshak.R.Hegde'
"""
Created on Jan 12 2015 PM 02:32

@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')

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

a, b, c, d = list(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')


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()

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")


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()

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=list(map(int,input().split()))
b=a[1]
c=a[2]
d=a[3]
a=a[0]
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('Tie')
else:
    print('Vasya')


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")


'''
Created on Jan 12, 2015

@author: mohamed265
'''
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=list(map(int,input().split()))
s1=max(3*a/10,a-a/250*c)
s2=max(3*b/10,b-b/250*d)
if s1>s2:
    print('Misha')
if s1<s2:
    print('Vasya')
if s1==s2:
    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")

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")

p=input().split()
a=int(p[0])
b=int(p[1])
c=int(p[2])
d=int(p[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(y>x):
    print("Vasya")
else:
    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')


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")
# print (mishaRes, vasyaRes)


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(' ')))
Vasya = max(3*b/10,b-(b/250*d))
Misha = max(3*a/10,a-(a/250*c))
if Vasya > Misha:
    print('Vasya')
elif Misha > Vasya:
    print('Misha')
else:
    print('Tie')


a, b, c, d = map(int, input().split(' '))
x = int(max(3*a/10, a-a*c/250))
y = int(max(3*b/10, b - b*d/250))

if x == y:
    print("Tie")
if x < y:
    print("Vasya")
if x > y:
    print("Misha")