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  points. Misha and Vasya are having an argument trying to find out who got more points. Help them to find out the truth.

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 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.

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

def f(p, t):
    return max((3*p) / 10.0, p - p / (250.0) * t)

if f(a, c) > f(b, d):
    print "Misha"
elif f(a, c) == f(b, d):
    print "Tie"
else:
    print "Vasya"

a,b,c,d=map(int,raw_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"
if y>x:
    print "Vasya"
if y==x:
    print "Tie"

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

# target Expert

# Author : raj1307 - Raj Singh
# Date   : 11.10.19

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 si(): return input()
def mi(): return map(int,input().strip().split(" "))
def li(): return list(mi())

def dmain():
    sys.setrecursionlimit(100000000)
    threading.stack_size(40960000)
    thread = threading.Thread(target=main)
    thread.start()

#from collections import deque, Counter, OrderedDict,defaultdict
#from heapq import nsmallest, nlargest, heapify,heappop ,heappush, heapreplace
#from math import ceil,floor,log,sqrt,factorial
#from bisect import bisect,bisect_left,bisect_right,insort,insort_left,insort_right
#from decimal import *,threading
#from itertools import permutations

abc='abcdefghijklmnopqrstuvwxyz'
abd={'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod=1000000007
#mod=998244353
inf = float("inf")
vow=['a','e','i','o','u']
dx,dy=[-1,1,0,0],[0,0,1,-1]
def getKey(item): return item[0]
def sort2(l):return sorted(l, key=getKey)
def d2(n,m,num):return [[num for x in range(m)] for y in range(n)]
def isPowerOfTwo (x): return (x and (not(x & (x - 1))) )
def decimalToBinary(n): return bin(n).replace("0b","")
def ntl(n):return [int(i) for i in str(n)]

def powerMod(x,y,p):
    res = 1
    x %= p
    while y > 0:
        if y&1:
            res = (res*x)%p
        y = y>>1
        x = (x*x)%p
    return res

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

def isPrime(n) : # Check Prime Number or not
    if (n <= 1) : return False
    if (n <= 3) : return True
    if (n % 2 == 0 or n % 3 == 0) : return False
    i = 5
    while(i * i <= n) :
        if (n % i == 0 or n % (i + 2) == 0) :
            return False
        i = i + 6
    return True

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

def main():

    #for _ in range(ii()):

    a,c,b,d=mi()

    x=max(3*a//10,a-(a//250)*b)
    y=max(3*c//10,c-(c//250)*d)

    if x==y:
        print('Tie')
    elif x>y:
        print('Misha')
    else:
        print('Vasya')

# region fastio

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):
    """Prints the values to a stream, or to sys.stdout by default."""
    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")

# endregion

if __name__ == "__main__":
    #read()
    main()
    #dmain()

# Comment Read()

a, b, c,d = map(int, raw_input().split())
mishascore=max(3*a/10,a-a/250*c)
vasyascore=max(3*b/10,b-b/250*d)
if mishascore<vasyascore:
    print "Vasya"
elif mishascore>vasyascore:
    print "Misha"
else:
    print "Tie"

# Author : code_marshal
# cmp is not available in python 3.x

a,b,c,d=map(int,raw_input().split())
ch=cmp(max(a*3//10,a-a*c//250),max(b*3//10,b-b*d//250))
if not ch:print "Tie"
elif ch==1:print "Misha"
else:print "Vasya"

a,b,c,d = map(int,raw_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(misha < vasya):
	print "Vasya"
else:
	print "Tie"

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

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

def findRes(a, b):
   if a < b:
      return 'Vasya'
   elif a > b:
      return 'Misha'
   else:
      return 'Tie'

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

print findRes(score(a, c), score(b, d))

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

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

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

# your code goes here
from sys import stdin
ar=map(float, stdin.readline().strip().split())
a=ar[0]
b=ar[1]
c=ar[2]
d=ar[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())
p1=max(3*a//10, a-(a/250)*c)
p2=max(3*b//10, b-(b/250)*d)
if p1>p2:
    print("Misha")
elif p2>p1:
    print("Vasya")
else :
    print("Tie")

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

a,b,c,d=map(int,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(r1<r2):
    print('Vasya')
else:
    print('Tie')

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

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")
elif t1 > t:
	print("Vasya")
else:
	print("Tie")

a,b,c,d = map(int,raw_input().split())
misha = max(3.0*a/10.0,a-a/250.0*c)
vasya = max(3.0*b/10.0,b-b/250.0*d)
if misha > vasya:
    print "Misha"
elif misha < vasya:
    print "Vasya"
else:
    print "Tie"

a,b,c,d=map(int,raw_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"
elif s2>s1:
    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")

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

a,b,c,d=map(int,input().split())
a = getpoint(a,c)
b = getpoint(b,d);
if a > b:
    print("Misha")
elif a < b:
    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")

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

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

str = raw_input()
inp = str.split(' ')

a = int(inp[0])
b = int(inp[1])
c = int(inp[2])
d = int(inp[3])

misha = max((a*3)/10, a-a/250*c)
vasya = max((b*3)/10, b-b/250*d)

if misha == vasya:
	print 'Tie'
elif misha > vasya:
	print 'Misha'
else:
	print 'Vasya'

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

import sys

a,b,c,d = map(int,sys.stdin.readline().split())
if 3*a/10 > a-a*c/250:
    misha = 3*a/10
else:
    misha = a-a*c/250
if 3*b/10 > b-b*d/250:
    vasya = 3*b/10
else:
    vasya = b-b*d/250
if misha>vasya:
    print 'Misha'
elif vasya>misha:
    print 'Vasya'
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")

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

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

# Problem: A. Contest
# Contest: Codeforces - Codeforces Round #285 (Div. 2)
# URL: https://codeforces.com/problemset/problem/501/A
# Memory Limit: 256 MB
# Time Limit: 1000 ms
# Powered by CP Editor (https://github.com/cpeditor/cpeditor)

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

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

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, raw_input().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'

#!/usr/bin/python
from __future__ import division
from sys import stdin, stdout

A, B, C, D = map (int, stdin.readline ().split ())
score1 = max (3 * A // 10, A - C * A // 250)
score2 = max (3 * B // 10, B - D * B // 250)

if score1 > score2:
	print 'Misha'
elif score1 < score2:
	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)
if vasya > misha:
    print("Vasya")
elif misha > vasya:
    print("Misha")
else:
    print("Tie")

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

#-*-coding:utf8;-*-
#qpy:3
#qpy:console

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

p1,p2,t1,t2=map(int,raw_input().split())
m=max((3*p1)/10,p1-(p1/250)*t1)
v=max((3*p2)/10,p2-(p2/250)*t2)
if m>v:
	print 'Misha'
elif m<v:
	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())
p1=max(3*a/10,a-a*c/250)
p2=max(3*b/10,b-b*d/250)
if p1>p2:
    print("Misha")
elif p1<p2:
    print("Vasya")
else:
    print("Tie")

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

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

print 'Misha' if judge(a,c)>judge(b,d) else 'Vasya' if judge(a,c)<judge(b,d) else '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')

x=input().split()
a=int(x[0])
b=int(x[1])
c=int(x[2])
d=int(x[3])

xpoint= max(3*a/10 ,a - (a/250)*c)
ypoint= max(3*b/10 ,b - (b/250)*d)
if xpoint==ypoint :
    print('Tie')
else:
    if xpoint>ypoint :
        print('Misha')
    else:
        print('Vasya')

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)

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

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

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

def ret_input():
    data = [int(x) for x in raw_input().split()]
    return data

def score(cost,time):
    return max(3*cost/10,cost-(cost/250)*time)

def contest(data):
    misha_cost = data[0]
    vasya_cost = data[1]
    misha_time = data[2]
    vasya_time = data[3]
    misha_points = score(misha_cost,misha_time)
    vasya_points = score(vasya_cost, vasya_time)
    if misha_points > vasya_points:
        return 'Misha'
    elif vasya_points > misha_points:
        return 'Vasya'
    else:
        return 'Tie'

def main():
    data = ret_input()
    print contest(data)

if __name__ == '__main__':
    main()

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

ac = max((3*a)//10,a-(a//250)*c)
bd = max((3*b)//10,b-(b//250)*d)

if ac>bd:
  print("Misha")
elif ac<bd:
  print("Vasya")
else:
  print("Tie")

a, b, c, d = map(int, raw_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'

a,b,c,d =[int(q) for q in raw_input().split(' ')]

s= 3*a/10
s2= a-(a/250)*c
s3= 3*b/10
s4= b-(b/250)*d
ans1=max(s,s2)
ans2=max(s3,s4)

if ans1>ans2:
	print 'Misha'
elif ans1==ans2:
	print 'Tie'
else:
	print 'Vasya'

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

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

import sys

def score(points, time):
    return max(float(3 * points) / 10, points - float(points)/250 * time)

a, b, c, d = [int(x) for x in sys.stdin.readline().split()]

misha_score, vasya_score = score(a, c), score(b, d)
if misha_score > vasya_score:
    print("Misha")
if misha_score == vasya_score:
    print("Tie")
if misha_score < vasya_score:
    print("Vasya")

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

a,b,c,d=map(int,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 p2>p1:
    print("Vasya")
else :
    print("Tie")

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

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

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")
elif t1 > t:
	print("Vasya")
else:
	print("Tie")

'''input
750 1000 54 103
'''
def getScore(p,t):
	p=int(p)
	t=int(t)
	return max((3*p) / 10, p - ((p/250) * t) )

def findWinner(inputString):
	varArray=inputString.split()
	if(getScore(varArray[0],varArray[2]) < getScore(varArray[1],varArray[3])):
		return "Vasya"
	elif(getScore(varArray[0],varArray[2]) > getScore(varArray[1],varArray[3])):
		return "Misha"
	else: return "Tie"

print(findWinner(raw_input()))

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

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

n = points(a, c)
m = points(b, d)

if n > m:
	print("Misha")
elif m > n:
	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())
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")

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

def poiCal(p,t):
    return max(3*p/10,p-(p*t/250))
a,b,c,d=map(int,raw_input().strip().split())
if poiCal(a,c)>poiCal(b,d):print "Misha"
elif poiCal(a,c)<poiCal(b,d):print "Vasya"
else :print "Tie"

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

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

# -*- coding: utf-8 -*-
import math
import sys

class Solver(object):

    def run(self):

        (a, b, c, d) = readarray(int)

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

        misha = point(a, c)
        vasya = point(b, d)

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

################################################################################
# ここからは見ちゃダメ！

def read(foo):
    return foo(raw_input())
def readarray(foo):
    return [foo(x) for x in raw_input().split()]
def dbg(a):
    sys.stderr.write(str(a))

if __name__ == '__main__':
    Solver().run()

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

ac = max((3*a)//10,a-(a//250)*c)
bd = max((3*b)//10,b-(b//250)*d)

if ac>bd:
  print("Misha")
elif ac<bd:
  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 v>m: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")

inputs=raw_input().split()

a=int(inputs[0])
b=int(inputs[1])
c=int(inputs[2])
d=int(inputs[3])

misha_score=max(((3*a)/10),(a-(a*c/250)))
vasya_score=max(((3*b)/10),(b-(b*d/250)))

if misha_score>vasya_score:
    print 'Misha'
elif vasya_score>misha_score:
    print 'Vasya'
else:
    print 'Tie'

a,b,c,d=map(int,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 p2>p1:
    print("Vasya")
else :
    print("Tie")

a,b,c,d = map(int,raw_input().split())
val = max((3*a)/10, a - (a*c)/250)
val1 = max((3*b)/10, b - (b*d)/250)
if val > val1 : print "Misha"
elif val1 > val : print "Vasya"
else : print "Tie"

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

x=input().split()
a=int(x[0])
b=int(x[1])
c=int(x[2])
d=int(x[3])

xpoint= a - (a/250)*c
ypoint= b - (b/250)*d
if xpoint==ypoint :
    print('Tie')
else:
    if xpoint>ypoint :
        print('Misha')
    else:
        print('Vasya')

def res(cost, time):
    return min(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")

import sys
line = map(int, raw_input().split())
a = line[0]
b = line[1]
c = line[2]
d = line[3]
m = max(3 * a, a - a * c / 25)
v = max(3 * b, b - b * d / 25)
if (m > v): sys.stdout.write('Misha')
elif (m < v): sys.stdout.write('Vasya')
else: sys.stdout.write('Tie')

a,b,c,d=map(int,input().split())
m,v=max((0.3*a),(c*(a/250))),max((0.3*b),(d*(b/250)))

if(m==v):
    print('Tie')
elif(m>v):
    print('Misha')
else:
    print('Vasya')

a, b, c, d = map(int, input().split())
x = max(a / 10, a - (a / 250) * c)
y = max(b / 10, a - (b / 250) * d)
if x < y:
    print('Misha')
elif y < x:
    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("Vaysa")

in1 = [int(x) for x in raw_input().split(" ")]

pM = in1[0]
pV = in1[1]
tM = in1[2]
tV = in1[3]

sM = max(.3*pM,pM-pM/250.0*tM)
sV = max(.3*pV,pV-pV/250.0*tV)

if sM>sV: print "Misha"
elif sM<sV: print "Vasya"
else: print "TFJLLKJFie"

from sys import stdin, stdout
m,n,o,p=[int(x) for x in stdin.readline().rstrip().split()]

def contest(a,b,c,d):
    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")
    return 0

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

misha = max(3 * a / 10, a - a / 250 * c)
vaysa = max(3 * b / 10, b - b / 250 * d)

if misha > vaysa:
    print 'Misha'
elif misha < vaysa:
    print 'Vaysa'
else:
    print 'Tie'

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

mp = max(3 * a // 10, a // 250 * c)
vp = max(3 * b // 10, b // 250 * d)

if vp > mp:
    print("Vasya")
elif mp > vp:
    print("Misha")
else:
    print("Tie")

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

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*c/250)))
if x>y:
    print("Misha")
elif x<y:
    print("Vasya")
else:
    print("Tie")

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

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

a,b,c,d = map(int, input().split(' '))
if a>b and c>d:
    print("Misha")
else:
    print("Vasya")
if a==b and c==d:
    print("Tie")

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

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

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

a,b,c,d =[int(q) for q in raw_input().split(' ')]

ans1= max(a , c*a)
ans2= max(b , d*b)

if ans1>ans2:
	print 'Misha'
elif ans1==ans2:
	print 'Tie'
else:
	print 'Vasya'

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

a,b,c,d=map(int,input().split())
m,v=max((0.3*a),(c*(a/250))),max((0.3*b),(d*(b/250)))

if(m==v):
    print('Tie')
elif(m>v):
    print('Misha')
else:
    print('Vasya')

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

#-*-coding:utf8;-*-
#qpy:3
#qpy:console

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

a,b,c,d = map(int,raw_input().split())
pa = max((3*a/10),a - (a/250)*c)
pb = max((3*b/10),b - (b/250)*c)
if pa>pb:
    print "Misha"
elif pa<pb:
    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*c/250)))
if x>y:
    print("Misha")
elif x<y:
    print("Vasya")
else:
    print("Tie")#1

import sys
line = map(float, raw_input().split())
a = line[0]
b = line[1]
c = line[2]
d = line[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 (m < v): print 'Vasaya'
else: print 'Tie'

a,b,c,d=map(int,input().split())
if(a>b):
    print("Misha")
elif(a==b):
    print("Tie")
else:
    print("Vasya")

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("Vaysa")
else:
    print("Tie")

a,b,c,d=map(int,input().split())
if(a>b and c<d):
    print("Misha")
elif(a==b and c==d):
    print("Tie")
else:
    print("Vasya")

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

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

"""
http://codeforces.com/problemset/problem/501/A
"""

def points(p, t):
    return max((3 * p) // 100, 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])

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)/c)
p2=int(a-((a*c)/250))
m.append(p1)
m.append(p2)

p1=int((3*b)/d)
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')

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

import sys
def getScore(p,t):
	p=int(p)
	t=int(t)
	return max(3*p, p - (p/250) * t )

def findWinner(inputString):
	varArray=inputString.split()
	if(getScore(varArray[0],varArray[2]) < getScore(varArray[1],varArray[3])):
		return "Vasya"
	elif(getScore(varArray[0],varArray[2]) > getScore(varArray[1],varArray[3])):
		return "Misha"
	else: return "Tie"

print(findWinner("500 1000 20 30")+'\n')
print(findWinner("1000 1000 1 1")+'\n')
print(findWinner("1500 1000 176 177")+'\n')
print sys.version

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

a, b, c, d = map(int, input().split())
if a * c > b * d:
    print('Misha')
elif b * d > a * c:
    print('Vasya')
else: print('Tie')

a,b,c,d=map(int,raw_input().split())
def M(p,t):
	return max((3*p)/10,(p*t)/250)
x=M(a,c)-M(b,d)

if x>1:
	print('Misha')
elif x<0:
	print('Vasya')
else:
	print('Tie')

#br = open('a.in')
a, b, c, d = map(int, raw_input().strip().split())

def com(p, t):
  p, t = p * 1.0, t * 1.0
  return max(3 * p, p - (p / 250) * t)

x, y = com(a, c), com(b, d)
if x == y:
  print 'Tie'
else:
  print ['Vasya', 'Misha'][x > y]

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

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

__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')
else:
    if(a==b):
        print('Tie')
    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")

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

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

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

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/250) * C)
vasya_scores = max((3*B)/10, (B/250) * D)

if misha_scores > vasya_scores:
    print('Misha')
elif misha_scores < vasya_scores:
    print('Vasya')
else:
    print('Tie')

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

m = max(3*a, a - a // 250 * c)
v = max(3*b, b - b // 250 * d)

if m == v:
    print("Tie")
elif m > v:
    print("Misha")
else:
    print("Vasya")

'''input
750 1000 54 103
'''
def getScore(p,t):
	p=int(p)
	t=int(t)
	return max((3*p) / 10, p - ((p/250) * t) )

def findWinner(inputString):
	varArray=inputString.split()
	print getScore(varArray[0],varArray[2]) , getScore(varArray[1],varArray[3])
	if(getScore(varArray[0],varArray[2]) < getScore(varArray[1],varArray[3])):
		return "Vasya"
	elif(getScore(varArray[0],varArray[2]) > getScore(varArray[1],varArray[3])):
		return "Misha"
	else: return "Tie"

print(findWinner(raw_input()))

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

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

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(a>b):
    print('Misha')
elif(a<b):
    print('Vasya')
else:
    print('Tie')

a,b,c,d=map(int,input().split())
p1=a-((a/250)*c)
p2=b-((b/250)*d)
if(p1>p2):
	print("Misha")
elif(p1==p2):
	print("Tie")
elif(p2>p1):
	print("Vasya")

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

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

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

a,b,c,d = map(int,input().split())
p,q = calc(a,c),calc(b,d)
print(p,q)
if p > q:
    print("Misha")
elif p == q:
    print("Tie")
else:
    print("Vasya")

a,b,c,d=map(int,input().split())
if(a>b and c<d):
    print("Misha")
elif(a==b and c<d):
    print("Misha")
elif(a==b and c>d):
    print("Vasya")
elif(a==b and c==d):
    print("Tie")
else:
    print("Vasya")

a,b,c,d = map(int, input().split(' '))
if a>b and c>d:
    print("Misha")
else:
    print("Vasya")
if a==b and c==d:
    print("Tie")

a,b,c,d = map(int,raw_input().split())
val = max((3*a)/10, (a*c)/250)
val1 = max((3*b)/10, (b*d)/250)
if val > val1 : print "Misha"
elif val1 > val : print "Vasya"
else : print "Tie"

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(res1)
print(res2)

if res1 > res2:
    print("Vasya")
elif res2 > res1:
    print("Misha")
else:
    print("Tie")

a,b,c,d=map(int,raw_input().split())
def M(p,t):
	return max((3*p)/10,(p*t)/250)
x=M(a,c)-M(b,d)

if x<0:
	print('Misha')
elif x>1:
	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,0.004*a*c)
score2=max(0.3*b,0.004*b*d)
if score1>score2:
	print('Misha')
elif score2>score1:
	print('Vasya')
else:
	print('Tie')

# target Expert

# Author : raj1307 - Raj Singh
# Date   : 11.10.19

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 si(): return input()
def mi(): return map(int,input().strip().split(" "))
def li(): return list(mi())

def dmain():
    sys.setrecursionlimit(100000000)
    threading.stack_size(40960000)
    thread = threading.Thread(target=main)
    thread.start()

#from collections import deque, Counter, OrderedDict,defaultdict
#from heapq import nsmallest, nlargest, heapify,heappop ,heappush, heapreplace
#from math import ceil,floor,log,sqrt,factorial
#from bisect import bisect,bisect_left,bisect_right,insort,insort_left,insort_right
#from decimal import *,threading
#from itertools import permutations

abc='abcdefghijklmnopqrstuvwxyz'
abd={'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod=1000000007
#mod=998244353
inf = float("inf")
vow=['a','e','i','o','u']
dx,dy=[-1,1,0,0],[0,0,1,-1]
def getKey(item): return item[0]
def sort2(l):return sorted(l, key=getKey)
def d2(n,m,num):return [[num for x in range(m)] for y in range(n)]
def isPowerOfTwo (x): return (x and (not(x & (x - 1))) )
def decimalToBinary(n): return bin(n).replace("0b","")
def ntl(n):return [int(i) for i in str(n)]

def powerMod(x,y,p):
    res = 1
    x %= p
    while y > 0:
        if y&1:
            res = (res*x)%p
        y = y>>1
        x = (x*x)%p
    return res

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

def isPrime(n) : # Check Prime Number or not
    if (n <= 1) : return False
    if (n <= 3) : return True
    if (n % 2 == 0 or n % 3 == 0) : return False
    i = 5
    while(i * i <= n) :
        if (n % i == 0 or n % (i + 2) == 0) :
            return False
        i = i + 6
    return True

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

def main():

    #for _ in range(ii()):

    a,c,b,d=mi()

    x=max(3*a//10,a-(a//250)*b)
    y=max(3*c//10,c-(c//250)*d)

    if x==y:
        print('Tie')
    elif x<y:
        print('Misha')
    else:
        print('Vasya')

# region fastio

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):
    """Prints the values to a stream, or to sys.stdout by default."""
    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")

# endregion

if __name__ == "__main__":
    #read()
    main()
    #dmain()

# Comment Read()

a,b,c,d =[int(q) for q in raw_input().split(' ')]

ans1= max(3*a/10 , (a-(a/25)*c))
ans2= max(3*b/10 , (b-(b/25)*d))

if ans1>ans2:
	print 'Misha'
elif ans1==ans2:
	print 'Tie'
else:
	print 'Vasya'

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*c)
if points_vasya > points_misha:
	print('Vasya')
elif points_misha > points_vasya:
	print('Misha')
else:
	print('Tie')

a,b,c,d = map(int,raw_input().split())
misha = max(3.0*a/10.0,a-a/250.0*c)
vasya = max(3.0*b/10.0,b-b/250.0*d)
if misha > vasya:
    print "Misha"
if misha < vasya:
    print "Vasya"
else:
    print "Tie"

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

a,b,c,d=map(int,input().split())
p1=a-((a/250)*c)
p2=b-((b/250)*d)
if(p1>p2):
	print("Misha")
elif(p1==p2):
	print("Tie")
elif(p2>p1):
	print("Vasya")

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

#
# CodeForcesian
# ♥
# M ^ 2

def point(p,t):
    return max((3*p,-(p/250)*t))
l=list(map(int,input().split()))
M=point(l[0],l[1])
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())

m = max(3*a, a - a // 250 * c)
v = max(3*b, b - b // 250 * d)

if m == v:
    print("Tie")
elif m > v:
    print("Misha")
else:
    print("Vasya")

a,b,c,d=map(int,raw_input().split())
l=["Misha","Vasya","Tie"]
ans=chk=0

def jg(p,t):
    sc=(((3*p)/10)+p)-(p/250)*t
    return sc

m=jg(a,c)
v=jg(b,d)
print l[0] if m>v else l[1] if m<v else l[2]

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

a,b,c,d = map(int, input().split())
e = max(3*a//10, a-a*b//250)
f = max(3*c//10, c-c*d//250)
if e > f:
    print("Vasya")
elif e < f:
    print("Misha")
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(a>b):
    print('Misha')
elif(a<b):
    print('Vasya')
else:
    print('Tie')

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


Developing tools for creation of locations maps for turn-based fights in a new game, Petya faced the following problem.A field map consists of hexagonal cells. Since locations sizes are going to be big, a game designer wants to have a tool for quick filling of a field part with identical enemy units. This action will look like following: a game designer will select a rectangular area on the map, and each cell whose center belongs to the selected rectangle will be filled with the enemy unit.More formally, if a game designer selected cells having coordinates (x1, y1) and (x2, y2), where x1 ≤ x2 and y1 ≤ y2, then all cells having center coordinates (x, y) such that x1 ≤ x ≤ x2 and y1 ≤ y ≤ y2 will be filled. Orthogonal coordinates system is set up so that one of cell sides is parallel to OX axis, all hexagon centers have integer coordinates and for each integer x there are cells having center with such x coordinate and for each integer y there are cells having center with such y coordinate. It is guaranteed that difference x2 - x1 is divisible by 2.Working on the problem Petya decided that before painting selected units he wants to output number of units that will be painted on the map.Help him implement counting of these units before painting.

The only line of input contains four integers x1, y1, x2, y2 ( - 109 ≤ x1 ≤ x2 ≤ 109,  - 109 ≤ y1 ≤ y2 ≤ 109) — the coordinates of the centers of two cells.

Output one integer — the number of cells to be filled.

x1,y1,x2,y2 = map (int,raw_input().split())
x = x2-x1+1
y = y2-y1+1
xy = 0
if y%2 == 1:
    Y=(y+1)/2
else:
    Y = y/2
if x%2 == 1:
    if y%2 == 1:
        xy = x*Y - x/2
    else:
        xy = x*Y
else:
    if y%2 == 1:
        xy = x*Y - x/2
    else:
        xy = x*Y
print xy

def main():
	# take in input
	x1, y1, x2, y2 = raw_input().split()
	x1 = int(x1); x2 = int(x2); y1 = int(y1); y2 = int(y2)
	sameX = (x1 % 2 == x2 % 2)
	sameY = (y1 % 2 == y2 % 2)
	maxHeight = int((y2 - y1)/2) + 1
	width = x2 - x1 + 1
	val = 0
	if sameY:
		if sameX:
			val = maxHeight*(int(width/2) + 1) + (maxHeight - 1)*(int(width/2))
		else:
			val = maxHeight*(int(width/2)) + (maxHeight - 1)*(int(width/2))
	else:
		val = maxHeight*width
	print val

if __name__ == "__main__":
	main()

import math
x1,y1,x2,y2=[int(x) for x in raw_input().split()]
x=abs(x1-x2)+1
y=abs(y1-y2)+1
if y%2==0:
    y=y/2
    print(x*y)
else:
    y=y/2
    ans=x*y
    ans+=int(math.ceil(x/2.0))
    print(ans)

x,y,xx,yy=map(int,raw_input().split())
dy=abs(yy-y)
dx=abs(x-xx)
print (dx/2+1)*(dy/2+1)+(dx/2)*dy/2

# -*- coding: utf-8 -*-
"""
Created on Mon Aug 31 20:57:45 2020

@author: Dark Soul
"""
[x1,y1,x2,y2]=list(map(int,input().split()))
tot=(x2-x1)//2
y=((y2-y1)//2)
bigy=y+1
sol=tot*y+(tot+1)*bigy
print(sol)

x1, y1, x2, y2 = (int(i) for i in raw_input().split())

xl = x2 - x1 + 1
yl = y2 - y1 + 1
if x1 % 2:
    xc = xl / 2
    xnc = xl - xc
else:
    xnc = xl / 2
    xc = xl - xnc

if y1 % 2:
    yc = yl / 2
    ync = yl - yc
else:
    ync = yl / 2
    yc = yl - ync

if (x1%2 == y1%2):
    print xc*yc+xnc*ync
else:
    print xc*ync+xnc*yc

a, b, c, d = map(int, raw_input().split())
print (c - a + 1) * (d - b + 1) + 1 >> 1

xo, yo, xk, yk = map(int, input().split())
print((xk - xo + 1) * (yk - yo + 1) // 2 + 1)

x1, y1, x2, y2 = map(int, input().split())
xdif = x2-x1
ydif = y2-y1
print(xdif//2*ydif//2 + (xdif//2+1) * (ydif//2 + 1))

import math

def main():
    x1, y1, x2, y2 = map(int, input().split())
    y, x = y2-y1, (x2-x1)//2
    ans = 0
    ans += (1+x)*(y//2 + 1)
    ans += x * (math.ceil(y/2))
    print(ans)

main()

#!/usr/bin/python3
# Copyright (C) 2016 Sayutin Dmitry.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; version 3
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; If not, see <http://www.gnu.org/licenses/>.

x1, y1, x2, y2 = map(int, input().split())

xlen = (x2 - x1) // 2
nature, innature = xlen + 1, xlen

baseheight = 1 + (y2 - y1) // 2

print(nature * baseheight + innature * (baseheight - 1))

A, B, C, D = map(int, raw_input().split())
print (C - A + 1) * (D - B + 1) // 2 + 1

import os, sys, pdb
import time, calendar, datetime
import math, itertools
import operator as op
from functools import reduce

def ncr(n, r):
    r = min(r, n-r)
    numer = reduce(op.mul, range(n, n-r, -1), 1)
    denom = reduce(op.mul, range(1, r+1), 1)
    return numer // denom

x1, y1, x2, y2 = list(map(int, input().split()))
print( ((x2 - x1 + 1) * (y2 - y1 + 1) + 1)//2 )

x,y,a,b = map(int,input().split(" "))

result = ( a-x+1 ) * ( (b-y)//2 + 1 ) - ( (a-x)//2 )

print(result)

import math

a, b, c, d = map(lambda x: int(x), input().split(' '))

h = 0
w = c - a + 1

h += (d - b + 1) // 2

summ = h * w

if((a + b) % 2 == 0):
    if(d - b) % 2 == 0:
        summ += w // 2 + w % 2
else:
    if(d - b) % 2 == 0:
        summ += w // 2 + w % 2

print(summ)

a, b, c, d = map(int, input().split(' '))
dy = (d-b)//2+1
dx = c - a + 1
print(dy*dx - (dx//2))

#!/usr/bin/python3
# Copyright (C) 2016 Sayutin Dmitry.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; version 3
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; If not, see <http://www.gnu.org/licenses/>.

def calc(y1, y2, r):
    if y1 % 2 != r:
        y1 -= 1
    if y2 % 2 != r:
        y2 += 1
    return (y2 - y1) // 2

x1, y1, x2, y2 = map(int, input().split())
x2, y2, x1, y1 = x2 - x1, y2 - y1, 0, 0

xlen = x2 - x1 + 1
odd, even = xlen // 2, xlen // 2
if xlen % 2 == 1:
    if x1 % 2 == 1:
        odd += 1
    else:
        even += 1
print(odd * calc(y1, y2, 0) + even * calc(y1, y2, 1))

x1, y1, x2, y2 = map(int, raw_input().split())

dx = x2 - x1
dy = y2 - y1

if dx % 2 == 0:
	even = dx / 2 + 1
	odd = dx / 2
else:
	even = (dx + 1) / 2
	odd = even

res = 0
if dy % 2 == 0:
	res = even * (dy / 2 + 1) + odd * (dy / 2)
else:
	res = even * (dy / 2 + 1) + odd * (dy / 2 + 1)

print res

x1, y1, x2, y2 = map(int, raw_input().split())
n = abs(x2 - x1)
m = abs(y2 - y1)
good_start = abs(x1 + y1) % 2 == 0
ans = (n / 2) * (m + 1)
ans += (m / 2) + 1
print ans

#!/usr/bin/env python
# -*- coding: utf-8 -*-
import math

def cnt(l, r):
    if l % 2 != 0:
        l += 1
    if r % 2 != 0:
        r -= 1
    l //= 2
    r //= 2
    if l <= r:
        return r - l + 1
    return 0

def count(x, l, r):
    if x % 2 == 0:
        return cnt(l, r)
    else:
        return (r - l + 1) - cnt(l, r)

line = input()
line = line.split()

x1 = int(line[0])
y1 = int(line[1])
x2 = int(line[2])
y2 = int(line[3])

print(((x2 - x1 + 1) * (y2 - y1 + 1) + 1) // 2)

# ans = (count(x1, y1, y2) + count(x1 + 1, y1, y2)) * (x2 - x1) // 2 + count(x2, y1, y2)
#
# print(ans)

from sys import stdin,stdout
from math import gcd, ceil, sqrt
ii1 = lambda: int(stdin.readline().strip())
is1 = lambda: stdin.readline().strip()
iia = lambda: list(map(int, stdin.readline().strip().split()))
isa = lambda: stdin.readline().strip().split()
mod = 1000000007

x1, y1, x2, y2 = iia()
print(((y2 - y1) // 2 + 1) * (x2 - x1 + 1) - (x2 - x1) // 2)

x1, y1, x2, y2 = (int(i) for i in raw_input().split())

xl = x2 - x1 + 1
yl = y2 - y1 + 1
if x1 % 2:
    xc = xl / 2
    xnc = xl - xc
else:
    xnc = xl / 2
    xc = xl - xnc

if y1 % 2:
    yc = yl / 2
    ync = yl - yc
else:
    ync = yl / 2
    yc = yl - ync

if (x1%2 == y1%2):
    print xc*yc+xnc*ync
else:
    print xc*ync+xnc* yc

# https://codeforces.com/contest/630/problem/E

import sys
import math

def main():
    # sys.stdin = open('E:\\Sublime\\in.txt', 'r')
    # sys.stdout = open('E:\\Sublime\\out.txt', 'w')
    # sys.stderr = open('E:\\Sublime\\err.txt', 'w')

    # n = int(sys.stdin.readline().strip())
    x1, y1, x2, y2 = map(int, sys.stdin.readline().strip().split()[:4])

    print(((y2 - y1) // 2 + 1) * (x2 - x1 + 1) - (x2 - x1) // 2)

if __name__ == '__main__':
    main()

# hajj
#  　　　　　　 ＿＿
# 　　　　　／＞　　フ
# 　　　　　| 　_　 _ l
# 　 　　　／` ミ＿xノ
# 　　 　 /　　　 　 |
# 　　　 /　 ヽ　　 ﾉ
# 　 　 │　　|　|　|
# 　／￣|　　 |　|　|
# 　| (￣ヽ＿_ヽ_)__)
# 　＼二つ

x1,y1,x2,y2 = map(int,raw_input().split())

x = x2 - x1
y = y2 - y1

if x % 2 == 0:
    hori = (x/2)+1
    if x1 % 2 == 1:
        print (y+1) * hori - y/2

    else:
        print (y+1) * hori - (y+1)/2

else:
    hori = (x+1)/2
    print (y+1) * hori

a = input().split(" ")
x1 = int(a[0])
y1 = int(a[1])
x2 = int(a[2])
y2 = int(a[3])

total = 0

ylen = y2 - y1
xlen = x2 - x1

total += (int(xlen / 2) + 1) * (int(ylen/2) + 1)
total += int(xlen / 2) * int(ylen / 2)

print(int(total))

from sys import stdin
x1, y1, x2, y2 =map(int, stdin.readline().split())
dx = x2 - x1
dy = y2 - y1
result2 = (dx + 1)*(dy + 1)

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

if even(dx) and even(dy):
    if even(x1 + y1):
        result2 = result2 + 1
    else:
        result2 = result2 - 1

print(int(result2//2))

x1, y1, x2, y2 = map(int, raw_input().split())
res = 0
def down_to_odd(x):
    if x % 2 == 0: return x - 1
    else: return x
def down_to_even(x):
    if x % 2 == 1: return x - 1
    else: return x
def up_to_odd(x):
    if x % 2 == 0: return x + 1
    else: return x
def up_to_even(x):
    if x % 2 == 1: return x + 1
    else: return x

if x1 % 2 == 1:
    low, up = up_to_odd(y1), down_to_odd(y2)
    res += ((x2 - x1) / 2 + 1) * ((up - low) / 2 + 1)
    low, up = up_to_even(y1), down_to_even(y2)
    res += ((x2 - x1) / 2) * ((up - low) / 2 + 1)
else:
    low, up = up_to_even(y1), down_to_even(y2)
    res += ((x2 - x1) / 2 + 1) * ((up - low) / 2 + 1)
    low, up = up_to_odd(y1), down_to_odd(y2)
    res += ((x2 - x1) / 2) * ((up - low) / 2 + 1)
print res

from sys import stdin
x1, y1, x2, y2 = map(int, stdin.readline().split())
dx = x2 - x1
dy = y2 - y1
result2 = (dx + 1)*(dy + 1)

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

if even(dx) and even(dy):
    if even(x1 + y1):
        result2 = result2 + 1
    else:
        result2 = result2 - 1

print(int(result2/2))

#!/usr/bin/python3
# Copyright (C) 2016 Sayutin Dmitry.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; version 3
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; If not, see <http://www.gnu.org/licenses/>.

def calc(y1, y2, r):
    if y1 % 2 != r:
        y1 -= 1
    if y2 % 2 != r:
        y2 += 1
    return (y2 - y1) // 2

x1, y1, x2, y2 = map(int, input().split())

xlen = x2 - x1 + 1
odd, even = xlen // 2, xlen // 2
if xlen % 2 == 1:
    if x1 % 2 == 1:
        odd += 1
    else:
        even += 1
print(odd, even)
print(odd * calc(y1, y2, 0) + even * calc(y1, y2, 1))

l,d,r,u = map(int, raw_input().split())
print int((r-l+1) * ((u-d)/2+0.5)) + 1

import math

a, b, c, d = map(lambda x: int(x), input().split(' '))

h = 0
w = c - a + 1

h += (d - b) // 2

summ = h * w

if((a + b) % 2 == 0):
    if(d - b) % 2 == 0:
        summ += w // 2 + w % 2
else:
    if(d - b) % 2 == 0:
        summ += w // 2

print(summ)

from sys import stdin
x1, y1, x2, y2 = map(int, stdin.readline().split())
dx = x2 - x1
dy = y2 - y1
result2 = (dx + 1)*(dy + 1)

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

if even(dx) and even(dy):
    if even(x1 + y1) and even(dy/2):
        result2 = result2 + 1
    else:
        result2 = result2 - 1

print(int(result2//2))

x1, y1, x2, y2 = map(int, input().split())

dx = x2 - x1
dy = y2 - y1

ux = uy = False

if dx % 2 == 1:
  ux = True
  dx += 1

if dy % 2 == 1:
  uy = True
  dy += 1

resx = dx/2+1
resy = dy/2+1

total = resx*resy + (resx-1)*(resy-1)

#print (int(total))

if ux or uy:
    total -= 1
    if ux:
        total -= dy/2
    if uy:
        total -= dx/2

print (int(total))

[x1, y1, x2, y2] = map(int, raw_input().split())
def odd(y1, y2): return (y2 + 1) / 2 - y1 / 2
def even(y1, y2): return odd(y1 - 1, y2 - 1)

ans = (x2 - x1) / 2 * (odd(y1, y2) + even(y1, y2))
if (x1 % 2): ans += odd(y1, y2)
else: ans += even(y1, y1)
print ans

from sys import stdin
x1, y1, x2, y2 = map(int, stdin.readline().split())
dx = x2 - x1
dy = y2 - y1
result2 = (dx + 1)*(dy + 1)

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

if even(dx) and even(dy):
    if even(x1 + y1):
        result2 = result2 + 1
    else:
        result2 = result2 - 1

print(int(result2//2))

import math

a, b, c, d = map(lambda x: int(x), input().split(' '))

h = 0
w = c - a + 1

h += (d - b + 1) // 2

summ = h * w

if((a + b) % 2 == 0):
    if(d - b) % 2 == 0:
        summ += w // 2 + w % 2
else:
    if(d - b) % 2 == 0:
        summ += w // 2

print(summ)

x1, y1, x2, y2 = map(int, raw_input().split())

dx = x2 - x1
dy = y2 - y1

if dx % 2 == 0:
	even = dx / 2 + 1
	odd = dx / 2
else:
	even = (dx + 1) / 2
	odd = even

res = 0
if dy % 2 == 0:
	res = even * (dy - 1) + odd * (dy - 2)
else:
	res = even * (dy - 1) + odd * (dy - 1)

print res

x1, y1, x2, y2 = map(int, input().split())

dx = x2 - x1
dy = y2 - y1

ux = uy = False

if dx % 2 == 1:
  ux = True
  dx += 1

if dy % 2 == 1:
  uy = True
  dy += 1

resx = dx/2+1
resy = dy/2+1

total = resx*resy + (resx-1)*(resy-1)

print (int(total))

if ux or uy:
    total -= 1
    if ux:
        total -= dy/2
    if uy:
        total -= dx/2

print (int(total))

#!/usr/bin/env python
# -*- coding: utf-8 -*-
import math

def cnt(l, r):
    if l % 2 != 0:
        l += 1
    if r % 2 != 0:
        r -= 1
    l = l // 2
    r = r // 2
    if l <= r :
        return r - l + 1
    return 0

def count(x, l, r):
    if x % 2 == 0:
        return cnt(l, r)
    else:
        return (r - l + 1) - cnt(l, r)

line = input()
line = line.split()

x1 = int(line[0])
y1 = int(line[1])
x2 = int(line[2])
y2 = int(line[3])

ans = (count(x1, y1, y2) + count(x1 + 1, y1, y2)) * (x2 - x1) // 2 + count(x1, y1, y2)

print(ans)

from sys import stdin
x1, y1, x2, y2 = map(int, stdin.readline().split())
dx = x2 - x1
dy = y2 - y1
result2 = (dx + 1)*(dy + 1)

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

if even(dx) and even(dy):
    if even(x1 + y1 + dy//2):
        result2 = result2 + 1
    else:
        result2 = result2 - 1

print(int(result2//2))

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

print((d-b+1)//2*(c-a+1) +1)

[x1, y1, x2, y2] = map(int, raw_input().split())
def odd(y1, y2): return (y2 + 1) / 2 - y1 / 2
def even(y1, y2): return odd(y1 - 1, y2 - 1)

ans = (x2 - x1) / 2 * (odd(y1, y2) + even(y1, y2))
if (x1 % 2): ans += odd(y1, y2)
else: ans += even(y1, y2)
print ans

a = input().split(" ")
x1 = int(a[0])
y1 = int(a[1])
x2 = int(a[2])
y2 = int(a[3])

xEvens = int((x2 - x1 + 2 - abs(x1 % 2) - abs(x2 % 2)) / 2)
xOdds = (x2 - x1) + 1 - xEvens

yEvens = int((y2 - y1 + 2 - abs(y1 % 2) - abs(y2 % 2)) / 2)
yOdds = (y2 - y1) + 1 - yEvens

print(xEvens * yEvens + yOdds * xOdds)

xo, yo, xk, yk = map(int, input().split())
f = lambda xo, yo, xk, yk: (xk // 2) * (yk // 2 - yo // 2) + (xo // 2) * (yo // 2 - yk // 2)
print(f(xo - 1, yo - 1, xk, yk) + f(xo, yo, xk + 1, yk + 1))

import math

a = input().split(" ")
x1 = int(a[0])
y1 = int(a[1])
x2 = int(a[2])
y2 = int(a[3])

total = 0

xlen = x2 - x1 + 1

ylarge = ((y2 - y1)/2) + 1
ysmall = (y2 - y1) / 2

total += ysmall * math.floor(xlen / 2.0)
total += ylarge * math.ceil(xlen / 2.0)

print(int(total))

A, B, C, D = map(int,raw_input().strip().split())
F = (C - A) // 2
E = C - A + 1 - F
ANS = 0
TB = B
TD = D
if A % 2 != TB % 2:
    TB += 1
if A % 2 != TD % 2:
    TD -= 1
ANS += ((TD - TB) // 2 + 1) *  E
TB = B
TD = D
if A % 2 == TB % 2:
    TB += 1
if A % 2 == TD % 2:
    TD -= 1
ANS += ((TD - TB) // 2 + 1) *  F
print ANS

x1, y1, x2, y2 = map(int, input().split())

dx = x2 - x1
dy = y2 - y1

#ux = False
#uy = False

#if dx % 2 == 1:
#  ux = True
#  dx += 1

#if dy % 2 == 1:
#  uy = True
#  dy += 1

resx = dx/2+1
resy = dy/2+1

total = resx*resy + (resx-1)*(resy-1)

print (int(total))
exit()

if ux or uy:
    total -= 1
    if ux:
        total -= dy/2
    if uy:
        total -= dx/2

print (int(total))