Two players are playing a game. First each of them writes an integer from 1 to 6, and then a dice is thrown. The player whose written number got closer to the number on the dice wins. If both payers have the same difference, it's a draw.

The first player wrote number a, the second player wrote number b. How many ways to throw a dice are there, at which the first player wins, or there is a draw, or the second player wins?


-----Input-----

The single line contains two integers a and b (1 ≤ a, b ≤ 6) — the numbers written on the paper by the first and second player, correspondingly.


-----Output-----

Print three integers: the number of ways to throw the dice at which the first player wins, the game ends with a draw or the second player wins, correspondingly.


-----Examples-----
Input
2 5

Output
3 0 3

Input
2 4

Output
2 1 3



-----Note-----

The dice is a standard cube-shaped six-sided object with each side containing a number from 1 to 6, and where all numbers on all sides are distinct.

You can assume that number a is closer to number x than number b, if |a - x| < |b - x|.

Difficulty: interview

Starter code:

Solutions:
a, b = list(map(int, input().split()))
res = [0,0,0]
for i in range(1, 7):
    if abs(a - i) < abs(b - i):
        res[0] += 1
    elif abs(a - i) == abs(b - i):
        res[1] += 1
    else:
        res[2] += 1
print(' '.join(map(str, res)))


f,d,s=0,0,0

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

for i in range(1,7):
    if(abs(a-i)==abs(b-i)):
        d+=1
    elif(abs(a-i)<abs(b-i)):
        f+=1
    else:
        s+=1
print(f,d,s)

a,b = list(map(int,input().split()))
pf,d,ps = 0,0,0
for i in range(1,7):
	if abs(a-i) < abs(b-i):
		pf+=1
	elif abs(a-i) > abs(b-i):
		ps+=1
	else:
		d+=1
print(pf,d,ps)


in_put=input().split(' ')
first=int(in_put[0])
second=int(in_put[1])
win=[]
draw=[]
lose=[]
for x in range(1, 7):
    if abs(x-first)<abs(x-second):
        lose.append(x)
    elif abs(x-first)>abs(x-second):
        win.append(x)
    else:
        draw.append(x)
print(str(len(lose))+' '+str(len(draw))+' '+str(len(win)))


a, b = list(map(int, input().split()))
x = y = z = 0
for i in range(1, 7):
    if(abs(a-i) < abs(b-i)):
        x += 1
    elif(abs(a-i) == abs(b-i)):
        y += 1
    else:
        z += 1
print("%d %d %d" % (x, y, z))



a,b = list(map(int,input().split()))
wins = 0
loss = 0
draw = 0
for i in range(1,7):
  if abs(a-i) < abs(b-i):
    wins += 1
  elif abs(a-i) > abs(b-i):
    loss += 1
  else:
    draw += 1

print(wins,draw,loss)


a, b = map(int, input().split())
if a < b:
    print((a + b - 1) // 2, 1 - (a + b) % 2, 6 - (a + b - 1) // 2 - 1 + (a + b) % 2)
elif a > b:
    print(6 - (a + b - 1) // 2 - 1 + (a + b) % 2, 1 - (a + b) % 2, (a + b - 1) // 2)
else:
    print(0, 6, 0)

line = input()

integers = [int(i) for i in line.split()]
a = integers[0]
b = integers[1]

x = 0
y = 0
z = 0

for i in range(1, 7):
    if abs(a - i) < abs(b - i):
        x += 1
    elif abs(a - i) == abs(b - i):
        y += 1
    else:
        z += 1

print(str(x) + ' ' + str(y) + ' ' + str(z))


def main():
    f = input().split()
    a = int(f[0])
    b = int(f[1])

    a_wins = 0
    b_wins = 0
    draw = 0

    for x in range(1, 7):
        if abs(a - x) < abs(b - x):
            a_wins += 1
        elif abs(a - x) > abs(b - x):
            b_wins += 1
        else:
            draw += 1

    print(a_wins, draw, b_wins)
    
def __starting_point():
    main()

__starting_point()

import math
a,b=list(map(int,input().split()))
win1,draw,win2=0,0,0
for i in range(1,7):
    c=math.fabs(a-i)
    d=math.fabs(b-i)
    if c<d:
        win1+=1
    elif c==d:
        draw+=1
    else:
        win2+=1
print(win1,draw,win2)


from sys import stdin

def cubic():
  values = stdin.readline().split()
  a=int(values[0])
  b=int(values[1])
  awins = 0
  bwins = 0
  ties =0
  for i in range(1, 7):
   if abs(a-i) < abs(b-i):
     awins+=1
   if abs(a-i)>abs(b-i):
     bwins +=1
   if abs(a-i) == abs(b-i):
    ties+=1
  print (awins, ties, bwins)
cubic()

a, b = list(map(int, input().split()))
if a == b: x, y, z = 0, 6, 0
else:
  y = 1-abs(a-b)%2
  if (a < b):
    x = a+(b-a-1)//2
    z = 6-x-y
  else:
    z = b+(a-b-1)//2
    x = 6-z-y

print("{} {} {}".format(x, y, z))


a, b = map(int, input().split())
k=0
l=0
s=0
for i in range(1, 7):
    if abs(a-i) > abs(b-i):
        k+=1
    elif abs(a-i)==abs(b-i):
        l+=1
    else:
        s+=1

print(s,l,k)

a, b = [int(s) for s in input().split()]

ans = [0, 0, 0]

for i in range(1, 7):
    if abs(a - i) < abs(b - i):
        ans[0] += 1
    elif abs(a - i) == abs(b - i):
        ans[1] += 1
    else:
        ans[2] += 1
print(*ans)

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

A=[]
for x in range (1,7):
    if (abs(a-x)<abs(b-x)):
        A.append(x)
    else:
        continue

B=[]
for y in range (1,7):
    if (abs(b-y)<abs(a-y)):
        B.append(y)
    else:
        continue

D=[]
for i in range (1,7):
    if (abs(a-i)==abs(b-i)):
        D.append(i)
    else:
        continue


print(str(len(A))+" "+str(len(D))+" "+str(len(B)))
        


import sys
inp = list(map(int, sys.stdin.readline().split()))

a = inp[0]
b = inp[1]

f = 0 # the # of numbers with which first person wins
d = 0 # the # of numbers with which second person wins
s = 0 # draw

for dice in range(1, 6+1):
    A = abs(dice - a)
    B = abs(dice - b)
    if A < B:
        f += 1
    if A > B:
        s += 1
    if A == B:
        d += 1
print(f, d, s)


(a,b) = tuple(map(int,input().split()))
n1 = n2 = 0
for i in (1,2,3,4,5,6):
    r1 = abs(a - i)
    r2 = abs(b - i)
    if r1 < r2:
        n1 += 1
    elif r1 > r2:
        n2 += 1
print(n1,6 - n1 - n2,n2)


from sys import stdin

a,b = map(int,stdin.readline().split())

aa = bb = ab = 0
for x in range(1,7):
    if abs(x-a) < abs(x-b):
        aa += 1
    elif abs(x-a) > abs(x-b):
        bb += 1
    else:
        ab += 1

print("{} {} {}".format(aa,ab,bb))

from sys import stdin

a,b = map(int,stdin.readline().split())

aa = bb = ab = 0
for x in (1,2,3,4,5,6):
    if abs(x-a) < abs(x-b):
        aa += 1
    elif abs(x-a) > abs(x-b):
        bb += 1
    else:
        ab += 1

print("{} {} {}".format(aa,ab,bb))

list=[0,0,0]
a,b=map(int,input().split())
for i in range(1,7):
    if abs(a-i)<abs(b-i):
        list[0]+=1
    elif abs(a-i)==abs(b-i):
        list[1]+=1
    else:
        list[2]+=1
for i in range(3):
    print(list[i],end=' ')

a, b = map(int, input().split())
c, d, e = 0, 0, 0
for i in range(1, 7):
    if abs(i - a) < abs(i - b):
        c += 1
    elif abs(i - a) > abs(i - b):
        e += 1
    else:
        d += 1
print(c, d, e, sep = ' ')



a, b = list(map(int, input().split()))
ans1 = ans2 = ans3 = 0
for i in range(6) : 
	if abs(a-(i+1)) == abs(b-(i+1)) : ans1 += 1
	elif abs(a-(i+1)) < abs(b-(i+1)) : ans2 += 1
	else : ans3 += 1
print(ans2, ans1, ans3)



a,b=tuple(map(int,input().split()))

ans=[0]*3
for i in range(1,7,1):
    if abs(i-a)<abs(i-b):
        ans[0]+=1
    elif abs(i-a)>abs(i-b):
        ans[2]+=1
    else:
        ans[1]+=1
print(' '.join(map(str,ans)))