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

Solutions:
(a, b) = input().split()
a = int(a)
b = int(b)
first = second = draw = 0
for i in range(1, 7):
	if abs(a - i) < abs(b - i):
		first = first + 1
	elif abs(a - i) > abs(b - i):
		second = second + 1
	else:
		draw = draw + 1
print(first, draw, second)


a = input().split()
x = int(a[0])
y = int(a[1])
a = 0
d = 0
b = 0
for i in range(1, 7):
	if abs(x - i) < abs(y - i):
		a += 1
	elif abs(x - i) > abs(y - i):
		b += 1
	else:
		d += 1
print(a, d, b)


import sys
(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) = get_ints()
c = d = e = 0
for i in range(1, 7):
	if abs(a - i) < abs(b - i):
		c += 1
	elif abs(a - i) > abs(b - i):
		e += 1
	else:
		d += 1
print(c, d, e)


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


(a, b) = map(int, input().split())
arr = [1, 2, 3, 4, 5, 6]
if a < b:
	count = 0
	for i in range(0, len(arr), 1):
		if abs(a - arr[i]) < abs(b - arr[i]):
			count += 1
		else:
			break
	count1 = 0
	for i in range(len(arr) - 1, -1, -1):
		if abs(b - arr[i]) < abs(a - arr[i]):
			count1 += 1
		else:
			break
	print(count, 6 - (count + count1), count1)
elif a >= b:
	count1 = 0
	for i in range(len(arr) - 1, -1, -1):
		if abs(a - arr[i]) < abs(b - arr[i]):
			count1 += 1
		else:
			break
	count = 0
	for i in range(0, len(arr), 1):
		if abs(b - arr[i]) < abs(a - arr[i]):
			count += 1
		else:
			break
	print(count1, 6 - (count + count1), count)


(a, b) = map(int, input().split())
c1 = 0
c2 = 0
c3 = 0
for i in range(1, 7):
	if abs(a - i) < abs(b - i):
		c1 += 1
	elif abs(b - i) < abs(a - i):
		c3 += 1
	else:
		c2 += 1
print(c1, c2, c3)


(a, b) = map(int, input().split())
ans = [0, 0, 0]
for x in range(1, 7):
	if abs(a - x) < abs(b - x):
		ans[0] += 1
	if abs(a - x) == abs(b - x):
		ans[1] += 1
	if abs(a - x) > abs(b - x):
		ans[2] += 1
print(*ans)


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


(a, b) = map(int, input().split())
(A, B) = (0, 0)
for i in range(1, 7):
	if abs(a - i) < abs(b - i):
		A += 1
	elif abs(a - i) > abs(b - i):
		B += 1
print(A, 6 - (A + B), B)


(a, b) = [int(j) for j in input().split()]
(p, v, n) = (0, 0, 0)
for i in range(6):
	if abs(i + 1 - a) < abs(i + 1 - b):
		p += 1
	elif abs(i + 1 - b) < abs(i + 1 - a):
		v += 1
	else:
		n += 1
print(p, n, v)


(a, b) = map(int, input().split())
wina = 0
draw = 0
winb = 0
for i in range(1, 7):
	if abs(a - i) == abs(b - i):
		draw += 1
	elif abs(a - i) > abs(b - i):
		winb += 1
	else:
		wina += 1
print(str(wina) + ' ' + str(draw) + ' ' + str(winb))


(a, b) = [int(elem) for elem in input().split(' ')]
(first, second, draw) = (0, 0, 0)
for i in [1, 2, 3, 4, 5, 6]:
	if abs(i - a) < abs(i - b):
		first += 1
	elif abs(i - a) == abs(i - b):
		draw += 1
	else:
		second += 1
print(first, draw, second)


n = input().split()
for i in range(len(n)):
	n[i] = int(n[i])
a = n[0]
b = n[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):
		z += 1
	else:
		y += 1
print(x, y, z)


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

def playdice(a, b):
	(count_1, count_2, count_3) = (0, 0, 0)
	for x in range(1, 7):
		if abs(x - a) < abs(x - b):
			count_1 += 1
		elif abs(x - a) == abs(x - b):
			count_2 += 1
		else:
			count_3 += 1
	print(count_1, count_2, count_3)
playdice(a, b)


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


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


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


(a, b) = map(int, input().split())
(a_, b_, ab) = (0, 0, 0)
for n in range(1, 6 + 1):
	if abs(n - a) < abs(n - b):
		a_ += 1
	elif abs(n - a) > abs(n - b):
		b_ += 1
	else:
		ab += 1
print(a_, ab, b_)


(a, b) = map(int, input().split())
(q, w, e) = (0, 0, 0)
for x in range(1, 7):
	if abs(a - x) > abs(b - x):
		q += 1
	elif abs(a - x) < abs(b - x):
		w += 1
	elif abs(a - x) == abs(b - x):
		e += 1
print(w, e, q)


(a, b) = map(int, input().split())
(a1, b1, t) = (0, 0, 0)
for x in range(1, 7):
	if abs(a - x) < abs(b - x):
		a1 += 1
	elif abs(a - x) > abs(b - x):
		b1 += 1
	else:
		t += 1
print(a1, t, b1)


line = input()
(a, b) = line.split()
player1 = 0
player2 = 0
draws = 0
for i in range(1, 7):
	diffPlayer1 = abs(int(a) - i)
	diffPlayer2 = abs(int(b) - i)
	if diffPlayer1 > diffPlayer2:
		player2 += 1
	elif diffPlayer2 > diffPlayer1:
		player1 += 1
	else:
		draws += 1
print(str(player1) + ' ' + str(draws) + ' ' + str(player2))


t = []
t = input().split()
a = int(t[0])
b = int(t[1])
da = []
db = []
for i in range(1, 7):
	if a < i:
		d = i - a
		da.append(d)
	else:
		d = a - i
		da.append(d)
	if b < i:
		d = i - b
		db.append(d)
	else:
		d = b - i
		db.append(d)
wa = 0
wb = 0
d = 0
for i in range(0, 6):
	if da[i] < db[i]:
		wa = wa + 1
	elif da[i] > db[i]:
		wb = wb + 1
	else:
		d = d + 1
wb = str(wb)
wa = str(wa)
d = str(d)
print(wa + ' ' + d + ' ' + wb)


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


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


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


ab = input().split()
a = int(ab[0])
b = int(ab[1])
sa = 0
draw = 0
sb = 0
for i in range(1, 7):
	if abs(a - i) < abs(b - i):
		sa = sa + 1
	elif abs(a - i) > abs(b - i):
		sb = sb + 1
	else:
		draw = draw + 1
print(sa, draw, sb)


inp = list(map(int, input().split()))
(a, b) = (inp[0], inp[1])
awin = draw = bwin = 0
for i in range(1, 7):
	if abs(a - i) < abs(b - i):
		awin += 1
	elif abs(a - i) == abs(b - i):
		draw += 1
	elif abs(b - i) < abs(a - i):
		bwin += 1
print(awin, draw, bwin)


(a, b) = map(int, input().split())
(wa, wb, ww) = (0, 0, 0)
for vd in [1, 2, 3, 4, 5, 6]:
	if abs(a - vd) < abs(b - vd):
		wa += 1
	elif abs(a - vd) > abs(b - vd):
		wb += 1
	else:
		ww += 1
print(wa, ww, wb)


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


(a, b) = map(int, input().split())
player1 = 0
player2 = 0
draw = 0
for i in range(1, 7):
	if abs(a - i) < abs(b - i):
		player1 = player1 + 1
	elif abs(a - i) > abs(b - i):
		player2 = player2 + 1
	else:
		draw += 1
print(str(player1) + ' ' + str(draw) + ' ' + str(player2))


(a, b) = input().split()
a = int(a)
b = int(b)
ab_diff = 0
a_diff = 0
b_diff = 0
for i in range(1, 7):
	if abs(i - a) < abs(i - b):
		a_diff += 1
	elif abs(i - a) > abs(i - b):
		b_diff += 1
	else:
		ab_diff += 1
print(a_diff, end=' ')
print(ab_diff, end=' ')
print(b_diff)


R = lambda : map(int, input().split())
(a, b) = R()
(p1, d, p2) = (0, 0, 0)
for i in range(1, 7):
	if abs(i - a) < abs(i - b):
		p1 += 1
	elif abs(i - a) > abs(i - b):
		p2 += 1
	else:
		d += 1
print('{0} {1} {2}'.format(p1, d, p2))


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


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


(a, b) = (int(s) for s in input().split())
a_win = 0
b_win = 0
for i in range(1, 7):
	if abs(a - i) < abs(b - i):
		a_win += 1
	elif abs(a - i) > abs(b - i):
		b_win += 1
output = [a_win, 6 - a_win - b_win, b_win]
print(*output)


st = [int(i) for i in input().split(' ')]
x1 = st[0]
x2 = st[1]
win1 = 0
win2 = 0
no = 0
for i in range(1, 7):
	if abs(x1 - i) < abs(x2 - i):
		win1 += 1
	elif abs(x1 - i) > abs(x2 - i):
		win2 += 1
	else:
		no += 1
print(win1, no, win2, sep=' ', end=' ')


apuestas = [int(i) for i in input().split()]
ganadores = [0, 0, 0]
for i in range(1, 7):
	if abs(apuestas[0] - i) == abs(apuestas[1] - i):
		ganadores[1] += 1
	elif abs(apuestas[0] - i) < abs(apuestas[1] - i):
		ganadores[0] += 1
	else:
		ganadores[2] += 1
print(ganadores[0], ganadores[1], ganadores[2])


(a, b) = map(int, input().split())
(a_wins, b_wins, draws) = (0, 0, 0)
for throw in range(1, 7):
	(a_diff, b_diff) = (abs(a - throw), abs(b - throw))
	if a_diff < b_diff:
		a_wins += 1
	elif b_diff < a_diff:
		b_wins += 1
	else:
		draws += 1
print(a_wins, draws, b_wins)


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


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


(a, b) = map(int, input().split())
if a == b:
	print('0 6 0')
else:
	k = (abs(b - a) - 1) // 2
	if (abs(a - b) - 1) % 2 != 0:
		l = 1
	else:
		l = 0
	if a > b:
		q = 6 - a + 1
	else:
		q = a
	print(q + k, l, 6 - (q + k + l))


a = [int(x) for x in input().split()]
count = 0
d = 0
n = 0
for i in range(1, 7):
	if abs(a[0] - i) < abs(a[1] - i):
		count += 1
	elif abs(a[0] - i) == abs(a[1] - i):
		d += 1
	else:
		n += 1
print(count, end=' ')
print(d, end=' ')
print(n)


from sys import stdin
(a, b) = map(int, stdin.readline().rstrip().split(' '))
aw = t = bw = 0
for i in range(1, 7):
	da = abs(a - i)
	db = abs(b - i)
	if da == db:
		t += 1
	elif da > db:
		bw += 1
	else:
		aw += 1
print(aw, t, bw)


(n, m) = map(int, input().split())
(a, d, b) = (0, 0, 0)
for i in range(1, 7):
	p = abs(n - i) - abs(m - i)
	a += p < 0
	d += p == 0
	b += p > 0
print(a, d, b)


pair_val = input()
a = int(pair_val.split()[0])
b = int(pair_val.split()[1])
i = 1
a_win_count = 0
b_win_count = 0
draw_count = 0
while i <= 6:
	if abs(a - i) < abs(b - i):
		a_win_count += 1
	elif abs(a - i) > abs(b - i):
		b_win_count += 1
	else:
		draw_count += 1
	i += 1
print(a_win_count, draw_count, b_win_count)


(a, b) = (int(s) for s in input().split())
(awins, bwins, ties) = (0, 0, 0)
for roll in range(1, 7):
	if abs(a - roll) < abs(b - roll):
		awins += 1
	elif abs(a - roll) > abs(b - roll):
		bwins += 1
	else:
		ties += 1
print(awins, ties, bwins)


(a, b) = map(int, input().split())
firstWin = secondWin = draw = 0
for i in range(1, 7):
	x = abs(a - i)
	y = abs(b - i)
	if x < y:
		firstWin += 1
	elif x == y:
		draw += 1
	elif x > y:
		secondWin += 1
print(firstWin, draw, secondWin)


t = [int(x) for x in input().split()]
fWin = sWin = draw = 0
for i in range(1, 7):
	if abs(t[0] - i) < abs(t[1] - i):
		fWin += 1
	elif abs(t[0] - i) > abs(t[1] - i):
		sWin += 1
	else:
		draw += 1
print(fWin, draw, sWin)


import sys

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

def sp():
	return map(int, data().split())

def l():
	return list(sp())
temp = l()
a = temp[0]
b = temp[1]
wins = 0
loss = 0
for i in range(1, 7):
	if abs(a - i) < abs(b - i):
		wins += 1
	if abs(b - i) < abs(a - i):
		loss += 1
draw = 6 - wins - loss
print(wins, draw, loss)


(a, b) = map(int, input().split())
nums = [1, 2, 3, 4, 5, 6]
(zero1, zero2, both) = (0, 0, 0)
for i in nums:
	if abs(a - i) < abs(b - i):
		zero1 += 1
	elif abs(a - i) > abs(b - i):
		both += 1
	else:
		zero2 += 1
print(zero1, zero2, both)


l = input().split(' ')
a = int(l[0])
b = int(l[1])
win1 = 0
win2 = 0
draw = 0
for i in range(1, 7):
	if abs(a - i) < abs(b - i):
		win1 += 1
	elif abs(a - i) > abs(b - i):
		win2 += 1
	else:
		draw += 1
print(win1, draw, win2)


(a, b) = map(int, input().split())
count_a = 0
count_draw = 0
count_b = 0
for i in range(1, 7):
	if abs(a - i) < abs(b - i):
		count_a += 1
	elif abs(b - i) < abs(a - i):
		count_b += 1
	else:
		count_draw += 1
print(count_a, count_draw, count_b)


n = list(map(int, input().split()))
a = int(n[0])
b = int(n[1])
f = 0
g = 0
c = 0
d = 0
e = 0
for i in range(1, 7):
	f = abs(a - i)
	g = abs(b - i)
	if f < g:
		c = c + 1
	if f == g:
		d = d + 1
	if f > g:
		e = e + 1
print(c, d, e, end=' ')


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


(a, b) = map(int, input().split())
s1 = 0
s2 = 0
s3 = 0
for i in range(1, 7):
	if abs(a - i) < abs(b - i):
		s1 = s1 + 1
	elif abs(a - i) == abs(b - i):
		s2 = s2 + 1
	else:
		s3 = s3 + 1
print(s1, s2, s3)


x = [int(y) for y in input().split()]
if x[0] == x[1]:
	print('0 6 0')
else:
	q = 0
	r = 0
	s = 0
	for n in range(1, 7):
		if abs(n - x[0]) < abs(n - x[1]):
			q += 1
		elif abs(n - x[0]) == abs(n - x[1]):
			r += 1
		else:
			s += 1
	pr = str(q) + ' ' + str(r) + ' ' + str(s)
	print(pr)


(m, n) = map(int, input().split())
(s, j, k) = (0, 0, 0)
for i in range(1, 7):
	if abs(m - i) < abs(n - i):
		s += 1
	elif abs(m - i) > abs(n - i):
		j += 1
	else:
		k += 1
print(s, k, j)


(a, b) = map(int, input().split())
A = 0
B = 0
c = 0
for i in range(1, 7):
	p = abs(a - i)
	q = abs(b - i)
	if p > q:
		B += 1
	elif q > p:
		A += 1
	else:
		c += 1
print(A, c, B)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, queue, copy
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
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 I():
	return int(sys.stdin.readline())

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

def S():
	return input()

def main():
	(a, b) = LI()
	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
	return str(x) + ' ' + str(y) + ' ' + str(z)
print(main())


(a, b) = map(int, input().split())
ca = cb = cd = 0
for i in range(1, 7):
	(d0, d1) = (abs(a - i), abs(b - i))
	if d0 < d1:
		ca += 1
	elif d0 == d1:
		cd += 1
	else:
		cb += 1
print(ca, cd, cb)


s = input()
s = s.split()
a = int(s[0])
b = int(s[1])
i = 1
won = 0
lost = 0
draw = 0
while i < 7:
	x = abs(a - i)
	y = abs(b - i)
	if x > y:
		won += 1
	elif x < y:
		lost += 1
	else:
		draw += 1
	i += 1
print(lost, draw, won)


s = input()
(a, b) = s.split(' ')
a = int(a)
b = int(b)
numAWins = 0
numBWins = 0
numDraws = 0
for i in range(1, 7):
	if abs(a - i) < abs(b - i):
		numAWins += 1
	elif abs(a - i) > abs(b - i):
		numBWins += 1
	else:
		numDraws += 1
print(str(numAWins) + ' ' + str(numDraws) + ' ' + str(numBWins))


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


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


def main():
	(a, b) = map(int, input().split())
	aw = 0
	d = 0
	bw = 0
	for i in range(1, 7):
		if abs(a - i) > abs(b - i):
			bw += 1
		elif abs(b - i) > abs(a - i):
			aw += 1
		else:
			d += 1
	print(f'{aw} {d} {bw}')
main()


(a, b) = map(int, input().split())
first = 0
throw = 0
second = 0
for f in range(1, 7):
	if abs(a - f) < abs(b - f):
		first += 1
	elif abs(a - f) > abs(b - f):
		second += 1
	else:
		throw += 1
print(first, throw, second)


(a, b) = (int(s) for s in input().split())
count_a = 0
count_b = 0
count_even = 0
for i in range(1, 7):
	a_diff = abs(a - i)
	b_diff = abs(b - i)
	if a_diff < b_diff:
		count_a += 1
	elif a_diff > b_diff:
		count_b += 1
	else:
		count_even += 1
print(count_a, count_even, count_b)


(a, b) = map(int, input().split())
aw = 0
bw = 0
t = 0
r = 0
s = 0
for i in range(1, 7):
	r = abs(a - i)
	s = abs(b - i)
	if r > s:
		bw = bw + 1
	elif s > r:
		aw = aw + 1
	else:
		t = t + 1
print(aw, t, bw)


(a, b) = map(int, input().split())
(m, n, o) = (0, 0, 0)
for i in range(1, 7):
	if abs(a - i) < abs(b - i):
		m += 1
	elif abs(a - i) == abs(b - i):
		n += 1
	else:
		o += 1
print(m, n, o)


(a, b) = (int(s) for s in input().split())
count_a_win = 0
count_b_win = 0
count_draw = 0
for i in range(1, 7):
	if abs(a - i) > abs(b - i):
		count_b_win += 1
	elif abs(a - i) < abs(b - i):
		count_a_win += 1
	else:
		count_draw += 1
print(count_a_win, count_draw, count_b_win)


temp = input()
temp = temp.split()
one = int(temp[0])
two = int(temp[1])
one_win = 0
two_win = 0
draw = 0
for x in range(1, 7):
	if abs(x - one) < abs(x - two):
		one_win += 1
	elif abs(x - one) > abs(x - two):
		two_win += 1
	else:
		draw += 1
print(str(one_win) + ' ' + str(draw) + ' ' + str(two_win))


x = list(map(int, input().split()))
if x[0] < x[1]:
	flag = 0
else:
	flag = 1
x.sort()
a = x[0]
b = x[1]
c = b - a
yo = a
ro = 6 - b + 1
if a == b:
	wina = 0
	winb = 0
	draw = 6
elif c % 2 == 0:
	draw = 1
	wina = yo + c // 2 - 1
	winb = ro + c // 2 - 1
else:
	draw = 0
	wina = yo + c // 2
	winb = ro + c // 2
if flag == 0:
	print(wina, draw, winb)
elif flag == 1:
	print(winb, draw, wina)
else:
	print(wina, draw, winb)


import math
(a, b) = map(int, input().split())
f = max(b, a) - min(a, b) - 1
d = min(a, b) + f // 2
e = 7 - max(a, b) + f // 2
m = [0, 6, 0] if a == b else [d, math.ceil(f / 2) - f // 2, e]
print(*(m if a <= b else m[::-1]))


(a, b) = map(int, input().strip().split())
(x, y, z) = (0, 0, 0)
for i in range(1, 7):
	x += abs(a - i) < abs(b - i)
	y += abs(a - i) == abs(b - i)
	z += abs(a - i) > abs(b - i)
print(x, y, z)


(a, b) = (int(s) for s in input().split())
(first, second, draw) = (0, 0, 0)
compar = [1, 2, 3, 4, 5, 6]
for i in compar:
	if abs(a - i) < abs(b - i):
		second += 1
	if abs(b - i) < abs(a - i):
		first += 1
	if abs(a - i) == abs(b - i):
		draw += 1
print(second, draw, first)


(a, b) = map(int, input().split())
a_c = 0
b_c = 0
for i in range(1, 7):
	if abs(a - i) < abs(b - i):
		a_c += 1
	elif abs(a - i) == abs(b - i):
		b_c += 1
print(a_c, b_c, 6 - a_c - b_c)


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


input_args = input()
a = int(input_args[0])
b = int(input_args[2])
win_a = 0
win_b = 0
draw = 0
for i in range(6):
	if abs(i + 1 - a) < abs(i + 1 - b):
		win_a += 1
	elif abs(i + 1 - a) == abs(i + 1 - b):
		draw += 1
	else:
		win_b += 1
print('{} {} {}'.format(win_a, draw, win_b))


(a, b) = map(int, input().split())
(w, t, l) = (0, 0, 0)
for i in range(1, 7):
	d1 = abs(a - i)
	d2 = abs(b - i)
	if d1 < d2:
		w += 1
	elif d1 > d2:
		l += 1
	elif d1 == d2:
		t += 1
print(w, t, l)


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 = LI()
	c = [0] * 3
	for i in range(1, 7):
		s1 = abs(a[0] - i)
		s2 = abs(a[1] - i)
		if s1 < s2:
			c[0] += 1
		elif s1 == s2:
			c[1] += 1
		else:
			c[2] += 1
	return ' '.join(map(str, c))
print(main())


(a, b) = map(int, input().split())
(x, y, z) = (0, 0, 0)
l = [1, 2, 3, 4, 5, 6]
for i in l:
	if abs(a - i) > abs(b - i):
		x += 1
	elif abs(b - i) > abs(a - i):
		y += 1
	else:
		z += 1
print(y, z, x)


(a, b) = map(int, input().split())
(first, tie, second) = (0, 0, 0)
for throw in range(1, 7):
	adiff = abs(a - throw)
	bdiff = abs(b - throw)
	if adiff < bdiff:
		first += 1
	elif adiff > bdiff:
		second += 1
	else:
		tie += 1
print(first, tie, second)


import sys
(a, b) = map(int, sys.stdin.readline().split())
if a == b:
	print('0 6 0')
else:
	m = (a + b) // 2
	if a < b:
		if (a + b) % 2 == 0:
			print('{} 1 {}'.format(m - 1, 6 - m))
		else:
			print('{} 0 {}'.format(m, 6 - m))
	elif (a + b) % 2 == 0:
		print('{} 1 {}'.format(6 - m, m - 1))
	else:
		print('{} 0 {}'.format(6 - m, m))


class CodeforcesTask378ASolution:

	def __init__(self):
		self.result = ''
		self.a_b = []

	def read_input(self):
		self.a_b = [int(x) for x in input().split(' ')]

	def process_task(self):
		ways = [0, 0, 0]
		for x in range(1, 7):
			if abs(x - self.a_b[0]) < abs(x - self.a_b[1]):
				ways[0] += 1
			elif abs(x - self.a_b[0]) == abs(x - self.a_b[1]):
				ways[1] += 1
			else:
				ways[2] += 1
		self.result = '{0} {1} {2}'.format(*ways)

	def get_result(self):
		return self.result
Solution = CodeforcesTask378ASolution()
Solution.read_input()
Solution.process_task()
print(Solution.get_result())


(a, b) = map(int, input().split())
x = int(1)
aa = bb = d = int(0)
while x <= 6:
	if abs(a - x) < abs(b - x):
		aa = aa + 1
	elif abs(a - x) > abs(b - x):
		bb = bb + 1
	else:
		d = d + 1
	x = x + 1
print(aa, d, bb)


def main():
	(n, k) = [int(v) for v in input().split()]
	(a, b, c) = (0, 0, 0)
	for i in range(1, 7):
		if abs(i - n) > abs(i - k):
			a += 1
		elif abs(i - n) < abs(i - k):
			b += 1
		else:
			c += 1
	print(b, c, a)
main()


(n, m) = list(map(int, input().split()))
ways = [0] * 3
for i in range(1, 7):
	if abs(n - i) < abs(m - i):
		ways[0] += 1
	elif abs(n - i) > abs(m - i):
		ways[2] += 1
	else:
		ways[1] += 1
print(' '.join((str(num) for num in ways)))


(n, m) = map(int, input().split())
b = 0
t = n
swap = False
n = min(n, m)
m = max(t, m)
if n != t:
	swap = True
if abs(n - m) % 2 == 0:
	b = 1
a = n + (abs(n - m) - 1) // 2
c = 6 - m + 1 + (abs(n - m) - 1) // 2
if n == m:
	print(0, 6, 0)
elif swap:
	print(c, b, a)
else:
	print(a, b, c)


(a, b) = [int(x) for x in input().split()]
a_win = 0
b_win = 0
tie = 0
for i in range(1, 7):
	if abs(i - a) < abs(i - b):
		a_win += 1
	elif abs(i - a) > abs(i - b):
		b_win += 1
	else:
		tie += 1
print(a_win, tie, b_win)


def answer():
	a = [int(x) for x in input().split()]
	p1 = a[0]
	p2 = a[1]
	i = 1
	(c, d, e) = (0, 0, 0)
	while i <= 6:
		if abs(p1 - i) < abs(p2 - i):
			c += 1
		elif abs(p1 - i) == abs(p2 - i):
			d += 1
		else:
			e += 1
		i += 1
	print(str(c) + ' ' + str(d) + ' ' + str(e))
answer()


(a, b) = (int(i) for i in input().split(' '))
(w1, draw, w2) = (0, 0, 0)
for i in [1, 2, 3, 4, 5, 6]:
	if abs(a - i) < abs(b - i):
		w1 += 1
	elif abs(a - i) > abs(b - i):
		w2 += 1
	else:
		draw += 1
print(w1, draw, w2)


first = 0
second = 0
draw = 0
(z, x) = list(map(int, input().split()))
for i in range(1, 7):
	if abs(i - z) < abs(i - x):
		first += 1
	elif abs(i - z) > abs(i - x):
		second += 1
	else:
		draw += 1
print(first, draw, second)


a = 0
a1 = 0
b1 = 0
b = 0
k = 0
ch = ''
while (b == 0) | (b > 6) | (a == 0) | (a > 6):
	ch = input()
	a = int(ch[0])
	b = int(ch[2])
for x in range(1, 7):
	if abs(a - x) < abs(b - x):
		a1 = a1 + 1
	elif abs(b - x) < abs(a - x):
		b1 = b1 + 1
	else:
		k = k + 1
print(a1, k, b1)


a = input().split()
st = int(a[0])
nd = int(a[1])
win1 = 0
draw = 0
win2 = 0
for i in range(1, 7):
	m = i - st
	n = i - nd
	if m < 0:
		m = m * -1
	if n < 0:
		n = n * -1
	if n > m:
		win1 = win1 + 1
	elif m > n:
		win2 = win2 + 1
	else:
		draw = draw + 1
s = str(win1) + ' ' + str(draw) + ' ' + str(win2)
print(s)


(a, b) = [int(i) for i in input().split()]
(aWins, bWins, draws) = (0, 0, 0)
for x in range(1, 7):
	if abs(a - x) < abs(b - x):
		aWins += 1
	elif abs(a - x) > abs(b - x):
		bWins += 1
	else:
		draws += 1
print(aWins, draws, bWins)


(a, b) = input().split()
a = int(a)
b = int(b)
win_a = 0
win_b = 0
draw = 0
for value in range(1, 7):
	if abs(a - value) < abs(b - value):
		win_a += 1
	elif abs(a - value) > abs(b - value):
		win_b += 1
	elif abs(a - value) == abs(b - value):
		draw += 1
print(win_a, end=' ')
print(draw, end=' ')
print(win_b)


def main():
	[a, b] = [int(_) for _ in input().split()]
	wins = [''] * 7
	for i in range(1, 7):
		points_a = abs(a - i)
		points_b = abs(b - i)
		wins[i] = 'a' if points_a < points_b else 'b' if points_b < points_a else '-'
	print(wins.count('a'), wins.count('-'), wins.count('b'))
main()


(a, b) = map(int, input().split())
f = 0
g = 0
for i in range(1, 7):
	if abs(a - i) < abs(b - i):
		f += 1
	elif abs(a - i) > abs(b - i):
		g += 1
print(f, 6 - (f + g), g)


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


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


(playerOne, playerTwo) = map(int, input().split())
oneWin = 0
twoWin = 0
draw = 0
for i in range(1, 7):
	if abs(playerOne - i) < abs(playerTwo - i):
		oneWin += 1
	elif abs(playerOne - i) > abs(playerTwo - i):
		twoWin += 1
	elif abs(playerTwo - i) == abs(playerOne - i):
		draw += 1
print(oneWin, draw, twoWin, end=' ')


(a, b) = (int(s) for s in input().split())
(res0, res1, res2) = (0, 0, 0)
for i in range(1, 7):
	if abs(i - a) < abs(i - b):
		res0 += 1
	elif abs(i - a) == abs(i - b):
		res1 += 1
	else:
		res2 += 1
print(res0, res1, res2)


list = [int(x) for x in input().split(' ')]
player_1 = 0
player_2 = 0
draw = 0
for i in range(1, 7):
	if abs(list[0] - i) < abs(list[1] - i):
		player_1 += 1
	elif abs(list[0] - i) > abs(list[1] - i):
		player_2 += 1
	else:
		draw += 1
print(player_1, draw, player_2)


z = list(map(int, input().split()))
(a, b) = (z[0], z[1])
f = s = n = 0
for i in range(1, 7):
	if abs(a - i) > abs(b - i):
		f += 1
	elif abs(a - i) == abs(b - i):
		n += 1
	else:
		s += 1
print(s, n, f)


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


(n, m) = map(int, input().split())
a = [0] * 3
for i in range(1, 7):
	x = abs(n - i)
	y = abs(m - i)
	if x > y:
		a[2] += 1
	elif x == y:
		a[1] += 1
	else:
		a[0] += 1
print(*a)


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


vals = [int(n) for n in input().split()]
a = vals[0]
b = vals[1]
aCounter = 0
draws = 0
bCounter = 0
for i in range(1, 7):
	if abs(a - i) < abs(b - i):
		aCounter += 1
	elif abs(a - i) > abs(b - i):
		bCounter += 1
	else:
		draws += 1
print('%d %d %d' % (aCounter, draws, bCounter))


import math
(n1, n2) = map(int, input().split())
(a, b, d) = (0, 0, 0)
for i in range(1, 7):
	d1 = abs(i - n1)
	d2 = abs(i - n2)
	if d1 < d2:
		a += 1
	elif d1 > d2:
		b += 1
	else:
		d += 1
print(a, d, b)


(n, m) = map(int, input().split())
op = (n + m) // 2
if (n + m) % 2 == 0:
	draw = 1
	if n == m:
		print(0, 6, 0)
	elif n < m:
		print(op - 1, draw, 6 - op)
	else:
		print(6 - op, draw, op - 1)
elif n < m:
	print(op, 0, 6 - op)
else:
	print(6 - op, 0, op)


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


def solve():
	(m, n) = list(map(int, input().strip().split()))
	first = 0
	draw = 0
	second = 0
	for i in range(1, 7):
		if abs(m - i) == abs(n - i):
			draw += 1
		elif abs(m - i) < abs(n - i):
			first += 1
		else:
			second += 1
	print('{} {} {}'.format(first, draw, second))
result = solve()


input_list = str(input())
first = 0
second = 0
third = 0
for value in range(1, 7):
	a_value = int(input_list[0]) - value
	b_value = int(input_list[2]) - value
	abs_value_a = abs(a_value)
	abs_value_b = abs(b_value)
	if abs_value_a < abs_value_b:
		first = first + 1
	elif abs_value_a == abs_value_b:
		second = second + 1
	else:
		third = third + 1
print(first, second, third)


def get_results(a, b):
	if a == b:
		return (0, 6, 0)
	else:
		a_wins = 0
		b_wins = 0
		draw = 0
		for i in range(6):
			if abs(a - (i + 1)) < abs(b - (i + 1)):
				a_wins += 1
			elif abs(a - (i + 1)) > abs(b - (i + 1)):
				b_wins += 1
			else:
				draw += 1
		return (a_wins, draw, b_wins)
input_str = input()
a = int(input_str[0])
b = int(input_str[2])
res = get_results(a, b)
print(res[0], res[1], res[2])


(a, b) = map(int, input().split())
t = 0
u = 0
v = 0
for x in range(1, 7):
	if abs(a - x) < abs(b - x):
		t += 1
	elif abs(a - x) > abs(b - x):
		u += 1
	else:
		v += 1
print(t, v, u)


import math
numbers = list(map(int, input().split()))
a = numbers[0]
b = numbers[1]
awin = 0
draw = 0
bwin = 0
for i in range(1, 7):
	diff_a = abs(a - i)
	diff_b = abs(b - i)
	if diff_a < diff_b:
		awin += 1
	elif diff_b < diff_a:
		bwin += 1
	else:
		draw += 1
print(awin, draw, bwin)


from sys import stdin
(a, b) = map(int, stdin.readline().strip().split())
print(*((0, 6, 0), (1, 0, 5), (1, 1, 4), (2, 0, 4), (2, 1, 3), (3, 0, 3), (5, 0, 1), (0, 6, 0), (2, 0, 4), (2, 1, 3), (3, 0, 3), (3, 1, 2), (4, 1, 1), (4, 0, 2), (0, 6, 0), (3, 0, 3), (3, 1, 2), (4, 0, 2), (4, 0, 2), (3, 1, 2), (3, 0, 3), (0, 6, 0), (4, 0, 2), (4, 1, 1), (3, 1, 2), (3, 0, 3), (2, 1, 3), (2, 0, 4), (0, 6, 0), (5, 0, 1), (3, 0, 3), (2, 1, 3), (2, 0, 4), (1, 1, 4), (1, 0, 5), (0, 6, 0))[a * 6 + b - 7])


(n, m) = map(int, input().split())
(x, y, k) = (0, 0, 0)
for i in range(1, 7):
	a = abs(n - i)
	b = abs(m - i)
	if a < b:
		x += 1
	elif b < a:
		y += 1
	else:
		k += 1
print(x, k, y)


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)


[a, b] = list(map(int, input().split(' ')))
s = [1, 2, 3, 4, 5, 6]
x = [0, 0, 0]
for i in s:
	sa = max(i - a, a - i)
	sb = max(i - b, b - i)
	if sa < sb:
		x[0] += 1
	elif sa == sb:
		x[1] += 1
	else:
		x[2] += 1
print(*x)


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


(a, b) = map(int, input().split())
f = 0
s = 0
d = 0
for j in range(1, 7):
	if abs(a - j) < abs(b - j):
		f += 1
	if abs(a - j) > abs(b - j):
		s += 1
	if abs(a - j) == abs(b - j):
		d += 1
print(f, d, s)


import sys
inp = list(map(int, sys.stdin.readline().split()))
a = inp[0]
b = inp[1]
f = 0
d = 0
s = 0
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 = input()
x = a.split()
dif1 = 0
dif2 = 0
a = 0
b = 0
c = 0
for i in range(1, 7):
	dif1 = abs(i - int(x[0]))
	dif2 = abs(i - int(x[1]))
	if dif1 < dif2:
		a = a + 1
	elif dif1 > dif2:
		b = b + 1
	else:
		c = c + 1
d = []
d.append(a)
d.append(c)
d.append(b)
for i in d:
	print(i, end=' ')


(a, b) = 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)))


inp = input()
(a, b) = inp.split(' ')
a = int(a)
b = int(b)
num_a = 0
num_d = 0
num_b = 0
for i in range(1, 7):
	diff_a = abs(i - a)
	diff_b = abs(i - b)
	if diff_a < diff_b:
		num_a += 1
	elif diff_b < diff_a:
		num_b += 1
	else:
		num_d += 1
print(f'{num_a} {num_d} {num_b}')


def solve(a, b):
	if a == b:
		return (0, 6, 0)
	(win, draw, lose) = (0, 0, 0)
	limit = (a + b) / 2
	if limit == int(limit):
		draw = 1
	limit = int(limit)
	win = limit - draw
	lose = 6 - win - draw
	if limit >= a:
		return (win, draw, lose)
	else:
		return (lose, draw, win)

def test():
	assert solve(2, 5) == (3, 0, 3)
	assert solve(2, 4) == (2, 1, 3)
	assert solve(4, 4) == (0, 6, 0)
test()
(a, b) = map(int, input().split())
res = solve(a, b)
print(' '.join((str(x) for x in res)))


n = list(map(int, input().split()))
win1 = 0
win2 = 0
draw = 0
for _ in range(1, 7):
	if abs(n[0] - _) > abs(n[1] - _):
		win2 += 1
	elif abs(n[0] - _) < abs(n[1] - _):
		win1 += 1
	else:
		draw += 1
print(win1, draw, win2)


contents = ''
while True:
	try:
		contents = input().split()
	except:
		break
first = secound = mid = 0
for item in range(1, 7):
	if abs(int(contents[0]) - item) > abs(int(contents[1]) - item):
		first += 1
	elif abs(int(contents[0]) - item) < abs(int(contents[1]) - item):
		secound += 1
	else:
		mid += 1
print(secound, mid, first)


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


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


input_data = input()
(a, b) = [int(i) for i in input_data.split()]
first_player = 0
draw = 0
second_player = 0
for dice in range(1, 7):
	if abs(dice - a) == abs(dice - b):
		draw += 1
	elif abs(dice - a) < abs(dice - b):
		first_player += 1
	elif abs(dice - a) > abs(dice - b):
		second_player += 1
print(' '.join([str(i) for i in [first_player, draw, second_player]]))


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


(a, b) = [int(x) for x in input().split()]
if a == b:
	print(0, 6, 0)
else:
	vmin = min(a, b)
	vmax = a + b - vmin
	ca = cb = 0
	draw = 0
	for i in range(vmin + 1, vmax):
		if abs(i - vmin) < abs(i - vmax):
			ca += 1
		elif abs(i - vmin) > abs(i - vmax):
			cb += 1
		else:
			draw += 1
	left = vmin + ca
	right = 6 - vmax + 1 + cb
	if vmin == b:
		temp = left
		left = right
		right = temp
	print(left, draw, right)


(a, b) = [int(x) for x in input().split()]
win = 0
loose = 0
equal = 0
for i in range(1, 7):
	diff1 = abs(a - i)
	diff2 = abs(b - i)
	if diff1 > diff2:
		loose = loose + 1
	elif diff1 < diff2:
		win = win + 1
	else:
		equal = equal + 1
print(str(win) + ' ' + str(equal) + ' ' + str(loose))


(a, b) = map(int, input().split())
draw = 0
win = 0
lose = 0
for i in range(1, 7):
	if abs(i - a) == abs(i - b):
		draw += 1
	elif abs(i - a) < abs(i - b):
		lose += 1
	else:
		win += 1
print(lose, draw, win)


nums = [int(i) for i in input().split(' ')]
p1w = 0
p2w = 0
draw = 0
for i in range(1, 7, 1):
	if abs(i - nums[0]) < abs(i - nums[1]):
		p1w += 1
	elif abs(i - nums[0]) > abs(i - nums[1]):
		p2w += 1
	else:
		draw += 1
print(str(p1w) + ' ' + str(draw) + ' ' + str(p2w))


(a, b) = map(int, input().split())
(near_a, near_b, eq) = (0, 0, 0)
for i in range(1, 7):
	if abs(a - i) < abs(b - i):
		near_a += 1
	elif abs(b - i) < abs(a - i):
		near_b += 1
	else:
		eq += 1
print(near_a, eq, near_b)


firstLine = [int(x) for x in input().split()]
scores = [0, 0, 0]
for i in range(1, 7):
	if abs(firstLine[0] - i) < abs(firstLine[1] - i):
		scores[0] += 1
	elif abs(firstLine[0] - i) == abs(firstLine[1] - i):
		scores[1] += 1
	else:
		scores[2] += 1
print(scores[0], scores[1], scores[2])


[a, b] = [int(x) for x in input().split()]
counta = 0
countd = 0
countb = 0
for i in range(1, 7):
	if abs(a - i) < abs(b - i):
		counta += 1
	elif abs(a - i) > abs(b - i):
		countb += 1
	else:
		countd += 1
print(counta, countd, countb)


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


(a, b) = [int(i) for i in input().split()]
(ac, dw, bc) = (0, 0, 0)
for i in range(1, 7):
	if abs(a - i) > abs(b - i):
		bc += 1
	elif abs(a - i) == abs(b - i):
		dw += 1
	else:
		ac += 1
print(str(ac) + ' ' + str(dw) + ' ' + str(bc))


def dice_game():
	player_numbs = input()
	numbers = list(map(int, player_numbs.split(' ')))
	a_num = numbers[0]
	b_num = numbers[1]
	a_wins = 0
	draws = 0
	b_wins = 0
	for i in range(1, 7):
		if abs(i - a_num) < abs(i - b_num):
			a_wins += 1
		if abs(i - a_num) > abs(i - b_num):
			b_wins += 1
		if abs(i - a_num) == abs(i - b_num):
			draws += 1
	return print(a_wins, draws, b_wins)
dice_game()


(a, b) = map(int, input().split())
aw = 0
draw = 0
bw = 0
for i in range(1, 7):
	if abs(i - a) < abs(i - b):
		aw += 1
for i in range(1, 7):
	if abs(i - a) == abs(i - b):
		draw += 1
for i in range(1, 7):
	if abs(i - a) > abs(i - b):
		bw += 1
print(aw, draw, bw)


p = [1, 2, 3, 4, 5, 6]
win1 = 0
win2 = 0
draw = 0
(a, b) = map(int, input().split())
for i in p:
	if abs(a - i) < abs(b - i):
		win1 += 1
	elif abs(a - i) > abs(b - i):
		win2 += 1
	else:
		draw += 1
print(win1, draw, win2)


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 = [int(x) for x in input().split()]
(a, b) = (a[0], a[1])
bb = 0
ba = 0
sr = 0
for i in range(1, 7):
	if abs(a - i) < abs(b - i):
		ba += 1
	elif abs(b - i) < abs(a - i):
		bb += 1
	else:
		sr += 1
print(ba, sr, bb)


(a, b) = [int(i) for i in input().split()]
conta = 0
contb = 0
contd = 0
for i in range(1, 7):
	if abs(a - i) < abs(b - i):
		conta += 1
	elif abs(a - i) > abs(b - i):
		contb += 1
	elif abs(a - i) == abs(b - i):
		contd += 1
print(conta, contd, contb)


def dice(arr):
	a = arr[0]
	b = arr[1]
	team_a = 0
	team_b = 0
	draw = 0
	for i in range(1, 7):
		dif1 = abs(a - i)
		dif2 = abs(b - i)
		if dif1 < dif2:
			team_a += 1
		if dif2 < dif1:
			team_b += 1
		if dif1 == dif2:
			draw += 1
	print(team_a, end=' ')
	print(draw, end=' ')
	print(team_b, end=' ')
arr = list(map(int, input('').split()))
dice(arr)


import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import *
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect, insort
from time import perf_counter
from fractions import Fraction
import copy
from copy import deepcopy
import time
starttime = time.time()
mod = int(pow(10, 9) + 7)
mod2 = 998244353

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

def out(*var, end='\n'):
	sys.stdout.write(' '.join(map(str, var)) + end)

def L():
	return list(sp())

def sl():
	return list(ssp())

def sp():
	return map(int, data().split())

def ssp():
	return map(str, data().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(n, val) for j in range(m)]
try:
	sys.stdin = open('input.txt', 'r')
except:
	pass

def pmat(A):
	for ele in A:
		print(*ele, end='\n')

def SUM(x):
	l = list(str(x))
	return sum((int(ele) for ele in l))
(a, b) = L()
A = [0 for i in range(3)]
for i in range(1, 7):
	if abs(a - i) < abs(b - i):
		A[0] += 1
	elif abs(a - i) == abs(b - i):
		A[1] += 1
	else:
		A[2] += 1
print(*A)
endtime = time.time()


(a, b) = [int(i) for i in input().split()]
naw = 0
nd = 0
nbw = 0
for i in range(1, 7):
	c = abs(a - i)
	d = abs(b - i)
	if c < d:
		naw += 1
	elif d < c:
		nbw += 1
	elif c == d:
		nd += 1
print(naw, nd, nbw)


f = lambda : map(int, input().split())
(p1, p2) = f()
w = d = l = 0
for i in range(1, 7):
	if abs(p1 - i) > abs(p2 - i):
		l += 1
	elif abs(p1 - i) < abs(p2 - i):
		w += 1
	else:
		d += 1
print(w, d, l)


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


(n, m) = map(int, input().split())
(a, d, b) = (0, 0, 0)
for i in range(1, 7):
	p = abs(n - i)
	q = abs(m - i)
	if p < q:
		a += 1
	elif p == q:
		d += 1
	else:
		b += 1
print(a, d, b)


(p1, p2) = map(int, input().split(' '))
p1_wins = 0
draw = 0
p2_wins = 0
for throw in range(1, 7):
	if abs(throw - p1) == abs(throw - p2):
		draw = draw + 1
	elif abs(throw - p1) < abs(throw - p2):
		p1_wins = p1_wins + 1
	else:
		p2_wins = p2_wins + 1
print(p1_wins, draw, p2_wins)


(a, b) = map(int, input().split())
x = sum((abs(a - i) < abs(b - i) for i in range(1, 7)))
y = 1 - (a - b) % 2 + 5 * (a == b)
print(x, y, 6 - x - y)


(a, b) = map(int, input().split())
if a == b:
	print(0, 6, 0)
elif a == 1 and b == 2 or (a == 6 and b == 5):
	print(1, 0, 5)
elif a == 1 and b == 3 or (a == 6 and b == 4):
	print(1, 1, 4)
elif a == 1 and b == 4 or (a == 2 and b == 3) or (a == 5 and b == 4) or (a == 6 and b == 3):
	print(2, 0, 4)
elif a == 1 and b == 5 or (a == 2 and b == 4) or (a == 5 and b == 3) or (a == 6 and b == 2):
	print(2, 1, 3)
elif a == 1 and b == 6 or (a == 2 and b == 5) or (a == 3 and b == 4) or (a == 6 and b == 1) or (a == 5 and b == 2) or (a == 4 and b == 3):
	print(3, 0, 3)
elif a == 2 and b == 1 or (a == 5 and b == 6):
	print(5, 0, 1)
elif a == 5 and b == 1 or (a == 4 and b == 2) or (a == 3 and b == 5) or (a == 2 and b == 6):
	print(3, 1, 2)
elif a == 4 and b == 6 or (a == 3 and b == 1):
	print(4, 1, 1)
elif a == 4 and b == 1 or (a == 3 and b == 2) or (a == 4 and b == 5) or (a == 3 and b == 6):
	print(4, 0, 2)


(a, b) = map(int, input().split())
(p, q, r) = (0, 0, 0)
for i in range(1, 7):
	if abs(a - i) > abs(b - i):
		p = p + 1
	elif abs(a - i) == abs(b - i):
		q = q + 1
	else:
		r = r + 1
print(r, q, p)


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


numeros = input().split(' ')
sorteo = 0
cuenta = 0
if int(numeros[0]) > int(numeros[1]):
	if (int(numeros[0]) - int(numeros[1])) % 2 == 0:
		sorteo = 1
		cuenta = (int(numeros[0]) + int(numeros[1])) / 2
		numero1 = 6 - int(cuenta)
		numero2 = int(cuenta) - 1
if int(numeros[1]) > int(numeros[0]):
	if (int(numeros[1]) - int(numeros[0])) % 2 == 0:
		sorteo = 1
		cuenta = (int(numeros[0]) + int(numeros[1])) / 2
		numero1 = int(cuenta) - 1
		numero2 = 6 - int(cuenta)
if numeros[1] == numeros[0]:
	sorteo = 6
	cuenta = 0
	numero1 = 0
	numero2 = 0
if int(numeros[0]) > int(numeros[1]):
	if (int(numeros[0]) - int(numeros[1])) % 2 != 0:
		cuenta = int(numeros[0]) - int(numeros[1])
		numero1 = 6 - int((int(numeros[0]) + int(numeros[1])) / 2)
		numero2 = int((int(numeros[0]) + int(numeros[1])) / 2)
if int(numeros[1]) > int(numeros[0]):
	if (int(numeros[1]) - int(numeros[0])) % 2 != 0:
		cuenta = int(numeros[1]) - int(numeros[0])
		numero1 = int((int(numeros[0]) + int(numeros[1])) / 2)
		numero2 = 6 - int((int(numeros[0]) + int(numeros[1])) / 2)
print(str(numero1) + ' ' + str(sorteo) + ' ' + str(numero2))


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


(n, m) = map(int, input().split())
(x, y, z) = (0, 0, 0)
for i in range(1, 7):
	check = abs(n - i) - abs(m - i)
	x += check < 0
	y += check == 0
	z += check > 0
print(x, y, z)


(a, b) = map(int, input().split(' '))
diff_a = []
diff_b = []
for i in range(6):
	diff_a.append(abs(a - (i + 1)))
	diff_b.append(abs(b - (i + 1)))
v = [0, 0, 0]
for i in range(6):
	if diff_a[i] < diff_b[i]:
		v[0] = v[0] + 1
	if diff_a[i] == diff_b[i]:
		v[1] = v[1] + 1
	if diff_a[i] > diff_b[i]:
		v[2] = v[2] + 1
print(' '.join((str(c) for c in v)))


(a, b) = map(int, input().split())
num_ways_tie = 0
a_wins_num_outcomes = 0
b_wins_num_outcomes = 0
for roll in range(1, 6 + 1):
	diff_a = abs(a - roll)
	diff_b = abs(b - roll)
	if diff_a == diff_b:
		num_ways_tie += 1
	elif diff_a < diff_b:
		a_wins_num_outcomes += 1
	else:
		b_wins_num_outcomes += 1
print(f'{a_wins_num_outcomes} {num_ways_tie} {b_wins_num_outcomes}')


(a, b) = map(int, input().split())
p1 = 0
draw = 0
p2 = 0
for i in range(1, 7):
	if abs(a - i) < abs(b - i):
		p1 += 1
	if abs(a - i) == abs(b - i):
		draw += 1
	if abs(a - i) > abs(b - i):
		p2 += 1
print(p1, draw, p2)


(a, b) = map(int, input().split())
draw = 0
if a == b:
	print('0 6 0')
else:
	if (a + b) % 2 == 0:
		draw = 1
	else:
		draw = 0
	mid = (a + b) // 2
	wina = mid - a + (a - 1) + 1
	if draw == 1:
		wina -= 1
	winb = b - (mid + 1) + (6 - b) + 1
	if 6 - a < 6 - b:
		(wina, winb) = (winb, wina)
	print('{} {} {}'.format(wina, draw, winb))


(a, b) = map(int, input().split())
(ga, e, gb) = (0, 0, 0)
for x in range(1, 7):
	k1 = a - x
	k2 = b - x
	if k1 < 0:
		k1 = -1 * k1
	if k2 < 0:
		k2 = -1 * k2
	if k1 < k2:
		ga += 1
	elif k1 == k2:
		e += 1
	else:
		gb += 1
print(ga, e, gb)


(a_val, b_val) = list(map(int, input().split()))
(win, draw, lose) = (0, 0, 0)
for throw in range(1, 7):
	first = abs(a_val - throw)
	second = abs(b_val - throw)
	if first > second:
		lose += 1
	elif first == second:
		draw += 1
	else:
		win += 1
print(win, draw, lose)


import math
import collections
import bisect
import heapq
import time
import random
import itertools
import sys
(a, b) = map(int, input().split())
(w, d, l) = (0, 0, 0)
for i in range(1, 7):
	if abs(a - i) == abs(b - i):
		d += 1
	elif abs(a - i) < abs(b - i):
		w += 1
	else:
		l += 1
print(w, d, l)


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) = RI()
l = [0] * 3
for i in range(1, 7):
	if abs(a - i) > abs(b - i):
		l[2] += 1
	if abs(a - i) < abs(b - i):
		l[0] += 1
	if abs(a - i) == abs(b - i):
		l[1] += 1
print(*l, sep=' ')


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


(a, b) = map(int, input().split())
z = x = c = 0
for i in range(1, 7):
	q = abs(a - i)
	w = abs(b - i)
	if q == w:
		x += 1
	elif q < w:
		z += 1
	else:
		c += 1
print(z, x, c)


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
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 linp():
	return list(map(int, sys.stdin.readline().strip().split()))

def p(a):
	print(a)

def p2(a, b):
	print(a, b)
(a, b) = ninp()
wa = 0
wb = 0
d = 0
for i in range(1, 7):
	d1 = abs(a - i)
	d2 = abs(b - i)
	if d1 == d2:
		d += 1
	elif d1 > d2:
		wb += 1
	else:
		wa += 1
print(wa, d, wb)


(a, b) = map(int, input().split())
teamA = teamB = Fr = 0
for i in range(1, 7):
	if abs(i - a) > abs(i - b):
		teamA += 1
	if abs(i - a) < abs(i - b):
		teamB += 1
	if abs(i - a) == abs(i - b):
		Fr += 1
print(teamB, Fr, teamA)


(a, b) = map(int, input().split())
a1 = b1 = c1 = 0
for i in range(1, 7):
	if abs(i - a) == abs(i - b):
		c1 += 1
	elif abs(i - a) < abs(i - b):
		a1 += 1
	elif abs(i - a) > abs(i - b):
		b1 += 1
print(a1, c1, b1)


import sys
(dice1, dice2) = map(int, sys.stdin.readline().strip().split())
firstWin = 0
secondWin = 0
for dice in range(1, 6 + 1):
	first = abs(dice - dice1)
	second = abs(dice - dice2)
	if first < second:
		firstWin += 1
	elif second < first:
		secondWin += 1
print(firstWin, 6 - firstWin - secondWin, secondWin)


l = [1, 2, 3, 4, 5, 6]
(n, m) = map(int, input().split())
if n == m:
	print('0 6 0')
	exit()
l.remove(n)
l.remove(m)
(a, b, c) = (0, 0, 0)
for i in l:
	if abs(i - n) < abs(i - m):
		a += 1
	elif abs(i - n) > abs(i - m):
		b += 1
	elif abs(i - n) == abs(i - m):
		c = c + 1
print(a + 1, c, b + 1)


import sys

def dice(a, b):
	one = draw = two = 0
	for i in range(1, 7):
		diff1 = abs(a - i)
		diff2 = abs(b - i)
		if diff1 == diff2:
			draw += 1
		elif diff1 < diff2:
			one += 1
		else:
			two += 1
	print(one, draw, two, sep=' ')

def main():
	(a, b) = sys.stdin.readline().split()
	dice(int(a), int(b))
	return
main()


import sys
_lines = sys.stdin.readlines()
input = iter(_lines).__next__

def main():
	(a, b) = map(int, input().split())
	(f, d, s) = (0, 0, 0)
	for i in range(1, 7):
		if abs(a - i) < abs(b - i):
			f += 1
		elif abs(a - i) == abs(b - i):
			d += 1
		else:
			s += 1
	print(f, d, s)
main()


(a, b) = [int(i) for i in input().split()]
(n1, n2, n3) = (0, 0, 0)
for i in range(1, 7):
	if abs(a - i) > abs(b - i):
		n3 += 1
	elif abs(a - i) == abs(b - i):
		n2 += 1
	else:
		n1 += 1
print(n1, n2, n3)


(inp1, inp2) = map(int, input().split())
first = 0
second = 0
draw = 0
for i in range(1, 7):
	if abs(inp1 - i) < abs(inp2 - i):
		first = first + 1
	elif abs(inp1 - i) > abs(inp2 - i):
		second = second + 1
	else:
		draw = draw + 1
print(str(first) + ' ' + str(draw) + ' ' + str(second))


(a, b) = (int(s) for s in input().split())
a1 = 0
b1 = 0
t = 0
for i in range(1, 7):
	if abs(i - a) < abs(i - b):
		a1 += 1
	elif abs(i - a) == abs(i - b):
		t += 1
	else:
		b1 += 1
print(a1, t, b1)


(a, b) = map(int, input().split())
(x, y, z) = (0, 0, 0)
for i in range(1, 6 + 1):
	diffa = abs(i - a)
	diffb = abs(i - b)
	if diffa == diffb:
		y += 1
	elif diffa < diffb:
		x += 1
	else:
		z += 1
print(x, y, z)


(a, b) = map(int, input().split())
(da, db, cnt) = ([], [], [0, 0, 0])
for i in range(1, 7):
	da.append(abs(i - a))
	db.append(abs(i - b))
	if da[i - 1] == db[i - 1]:
		cnt[1] += 1
	elif da[i - 1] > db[i - 1]:
		cnt[2] += 1
	elif db[i - 1] > da[i - 1]:
		cnt[0] += 1
if a == b:
	print('0 6 0')
else:
	print(*cnt, sep=' ')


(c, b) = list(map(int, input().split()))
player1 = 0
t = 0
player2 = 0
for i in range(1, 7):
	if abs(c - i) < abs(b - i):
		player1 += 1
	elif abs(c - i) > abs(b - i):
		player2 += 1
	else:
		t += 1
print(player1, t, player2)


a = [int(i) for i in input().split(' ')]
one = a[0]
two = a[1]
ct1 = 0
counter2 = 0
for i in range(1, 7):
	ct1 += abs(one - i) > abs(two - i)
	counter2 += abs(one - i) < abs(two - i)
print(counter2, 6 - counter2 - ct1, ct1)


(a, b) = (int(s) for s in input().split())
first_win = 0
second_win = 0
draw = 0
for i in range(1, 7):
	if abs(a - i) < abs(b - i):
		first_win += 1
	elif abs(a - i) > abs(b - i):
		second_win += 1
	else:
		draw += 1
print(first_win, draw, second_win)


x = [int(item) for item in input().split()]
player1 = 0
player2 = 0
player3 = 0
for item in list(range(1, 7)):
	if abs(item - x[0]) > abs(item - x[1]):
		player2 = player2 + 1
	elif abs(item - x[0]) == abs(item - x[1]):
		player3 = player3 + 1
	else:
		player1 = player1 + 1
print(str(player1) + ' ' + str(player3) + ' ' + str(player2))


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

def func(a, b):
	if b > a:
		return b - a
	else:
		return a - b
(a1, a2, a3) = (0, 0, 0)
for i in range(1, 7):
	if func(a, i) < func(b, i):
		a1 += 1
	elif func(a, i) > func(b, i):
		a3 += 1
	else:
		a2 += 1
print(a1, a2, a3)


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


(c, d) = map(int, input().split())
if c == d:
	print(0, 6, 0)
else:
	a = min(c, d)
	b = max(c, d)
	first = a + (b - a - 1) // 2
	second = 6 - b + 1 + (b - a - 1) // 2
	draw = abs(6 - (second + first))
	if c < d:
		print(first, draw, second)
	else:
		print(second, draw, first)


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


(a, b) = map(int, input().split())
if a == b:
	print(0, 6, 0)
elif a < b:
	a_wins = a - 1 + 1
	b_wins = 6 - b + 1
	draw = 0
	for i in range(a + 1, b):
		if i - a == b - i:
			draw += 1
		elif i - a < b - i:
			a_wins += 1
		else:
			b_wins += 1
	print(a_wins, draw, b_wins)
else:
	(a, b) = (b, a)
	a_wins = a - 1 + 1
	b_wins = 6 - b + 1
	draw = 0
	for i in range(a + 1, b):
		if i - a == b - i:
			draw += 1
		elif i - a < b - i:
			a_wins += 1
		else:
			b_wins += 1
	print(b_wins, draw, a_wins)


(a, b) = map(int, input().split())
k1 = 0
k2 = 0
k3 = 0
for i in range(1, 7):
	if abs(i - a) > abs(i - b):
		k3 = k3 + 1
	if abs(i - a) == abs(i - b):
		k2 = k2 + 1
	if abs(i - a) < abs(i - b):
		k1 = k1 + 1
print(k1, k2, k3)


(a, b) = 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) = map(int, input().split())
l = [1, 2, 3, 4, 5, 6]
(p1, p2, p3) = (0, 0, 0)
for i in l:
	if abs(i - a) < abs(i - b):
		p1 += 1
	elif abs(i - b) < abs(i - a):
		p2 += 1
	else:
		p3 += 1
print(p1, p3, p2)


(a, b) = (int(i) for i in input().split(' '))
diff_a = [abs(a - i) for i in range(1, 7)]
diff_b = [abs(b - i) for i in range(1, 7)]
x = [1 if diff_b[i] > diff_a[i] else 0 for i in range(6)]
y = [1 if diff_b[i] == diff_a[i] else 0 for i in range(6)]
z = [1 if diff_a[i] > diff_b[i] else 0 for i in range(6)]
print(' '.join([str(sum(x)), str(sum(y)), str(sum(z))]))


(a, b) = map(int, input().split())
c1 = 0
c2 = 0
c3 = 0
for j in range(1, 7):
	chk1 = a - j
	if chk1 < 0:
		chk1 = -chk1
	chk2 = b - j
	if chk2 < 0:
		chk2 = -chk2
	if chk1 < chk2:
		c1 += 1
	elif chk1 == chk2:
		c2 += 1
	else:
		c3 += 1
print(c1, c2, c3)


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


(a, b) = map(int, input().split())
if a == b:
	print('0 6 0')
else:
	w = 0
	d = 0
	l = 0
	for i in range(1, 7):
		diff = abs(b - i) - abs(a - i)
		if diff > 0:
			w += 1
		elif diff == 0:
			d += 1
		else:
			l += 1
	print('{} {} {}'.format(w, d, l))


(a, b) = map(int, input().split())
num = 0
num1 = 0
num2 = 0
for i in range(1, 7):
	if abs(a - i) > abs(b - i):
		num2 += 1
	elif abs(a - i) == abs(b - i):
		num1 += 1
	else:
		num += 1
print(num, num1, num2)


import sys

def readInputs():
	global a, b
	(a, b) = map(int, f.readline().split())

def solve():
	aWin = 0
	draw = 0
	bWin = 0
	for i in range(1, 7):
		distA = abs(a - i)
		distB = abs(b - i)
		if distA < distB:
			aWin += 1
		elif distA > distB:
			bWin += 1
		else:
			draw += 1
	print(aWin, draw, bWin)

def main():
	global f
	f = sys.stdin
	readInputs()
	solve()
main()


players = [int(x) for x in input().split()]
result = [0, 0, 0]

def isCloser(dice, a, b):
	if a - dice < 0:
		diffA = dice - a
	else:
		diffA = a - dice
	if b - dice < 0:
		diffB = dice - b
	else:
		diffB = b - dice
	return (diffA, diffB)
win = 0
draw = 0
lose = 0
for x in range(1, 7):
	(x, y) = isCloser(x, players[0], players[1])
	if x < y:
		win += 1
	elif x > y:
		lose += 1
	else:
		draw += 1
print(win, draw, lose)


(a, b) = [int(c) for c in input().split()]
res = [0, 0, 0]
for i in range(1, 6 + 1):
	if abs(a - i) < abs(b - i):
		res[0] += 1
	elif abs(a - i) > abs(b - i):
		res[2] += 1
	else:
		res[1] += 1
print(*res)


(player1, player2) = map(int, input().split())
(first_wins, draw, second_wins) = (0, 0, 0)
for i in range(1, 7):
	(close_to_player1, close_to_player2) = (abs(i - player1), abs(i - player2))
	if close_to_player1 < close_to_player2:
		first_wins += 1
	elif close_to_player1 == close_to_player2:
		draw += 1
	else:
		second_wins += 1
print(first_wins, draw, second_wins)


(a, b) = [int(item) for item in input().split()]
counta = 0
countb = 0
countc = 0
for i in range(1, 7):
	if abs(i - a) < abs(i - b):
		counta += 1
	elif abs(i - a) > abs(i - b):
		countb += 1
	elif abs(i - a) == abs(i - b):
		countc += 1
print(counta, end=' ')
print(countc, end=' ')
print(countb, end=' ')


def igra(a, b):
	(count1, count2, count3) = (0, 0, 0)
	for i in range(1, 7):
		if abs(a - i) > abs(b - i):
			count2 += 1
		elif abs(a - i) < abs(b - i):
			count1 += 1
		else:
			count3 += 1
	return (count1, count3, count2)
(A, B) = [int(i) for i in input().split()]
print(*igra(A, B))


(a, b) = input().split()
(a, b) = (int(a), int(b))
count1 = 0
count2 = 0
if abs(a - 1) < abs(b - 1):
	count1 = count1 + 1
elif abs(a - 1) == abs(b - 1):
	count2 = count2 + 1
if abs(a - 2) < abs(b - 2):
	count1 = count1 + 1
elif abs(a - 2) == abs(b - 2):
	count2 = count2 + 1
if abs(a - 3) < abs(b - 3):
	count1 = count1 + 1
elif abs(a - 3) == abs(b - 3):
	count2 = count2 + 1
if abs(a - 4) < abs(b - 4):
	count1 = count1 + 1
elif abs(a - 4) == abs(b - 4):
	count2 = count2 + 1
if abs(a - 5) < abs(b - 5):
	count1 = count1 + 1
elif abs(a - 5) == abs(b - 5):
	count2 = count2 + 1
if abs(a - 6) < abs(b - 6):
	count1 = count1 + 1
elif abs(a - 6) == abs(b - 6):
	count2 = count2 + 1
print(count1, count2, 6 - count1 - count2)


(a, b) = map(int, input().split(' '))
ans = [0, 0, 0]
for i in range(1, 7):
	(diffa, diffb) = (abs(i - a), abs(i - b))
	if diffa < diffb:
		ans[0] += 1
	elif diffa == diffb:
		ans[1] += 1
	else:
		ans[2] += 1
flag = False
for x in ans:
	if flag:
		print(end=' ')
	print(x, end='')
	flag = True
print()


(a, b) = map(int, input().split())
cnt1 = cnt2 = cnt3 = 0
for i in range(1, 7):
	if abs(a - i) < abs(b - i):
		cnt1 += 1
	elif abs(a - i) == abs(b - i):
		cnt2 += 1
	else:
		cnt3 += 1
print(cnt1, cnt2, cnt3)


(a1, a2) = map(int, input().split())
(ans1, ans2, tie) = (0, 0, 0)
for i in range(1, 7):
	if abs(a1 - i) < abs(a2 - i):
		ans1 += 1
	elif abs(a1 - i) > abs(a2 - i):
		ans2 += 1
	else:
		tie += 1
print(str(ans1) + ' ' + str(tie) + ' ' + str(ans2))


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


import math
(a, b) = tuple([int(i) for i in input().split()])
m = (a + b) / 2
if a < b:
	print(math.ceil(m - 1), 1 - math.ceil(m % 1), math.ceil(6 - m))
elif a > b:
	print(math.ceil(6 - m), 1 - math.ceil(m % 1), math.ceil(m - 1))
else:
	print(0, 6, 0)


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


(a, b) = map(int, input().strip().split())
(awin, draw, bwin) = (0, 0, 0)
for i in range(1, 7):
	if abs(a - i) < abs(b - i):
		awin += 1
	elif abs(a - i) == abs(b - i):
		draw += 1
	else:
		bwin += 1
print(awin, draw, bwin)


line = input().split(' ')
a = int(line[0])
b = int(line[1])
firstwin = 0
draw = 0
secondwin = 0
for d in range(1, 7):
	first = abs(a - d)
	second = abs(b - d)
	if first == second:
		draw += 1
	elif first > second:
		secondwin += 1
	else:
		firstwin += 1
print('{} {} {}'.format(firstwin, draw, secondwin))


(n, m) = map(int, input().split())
c1 = 0
c2 = 0
w = 0
for i in range(1, 7):
	if abs(n - i) < abs(m - i):
		c1 += 1
	elif abs(n - i) > abs(m - i):
		c2 += 1
	else:
		w += 1
print('{} {} {}'.format(c1, w, c2))


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) = read_int_array()
aw = 0
d = 0
bw = 0
for i in range(1, 7):
	c = abs(i - a) - abs(i - b)
	if c < 0:
		aw += 1
	elif c > 0:
		bw += 1
	else:
		d += 1
print(aw, d, bw)


import math
[a, b] = map(int, input().split())
z = 0
x = 0
c = 0
for i in range(6):
	if math.fabs(i - a + 1) < math.fabs(i - b + 1):
		z = z + 1
	elif math.fabs(i - a + 1) > math.fabs(i - b + 1):
		c = c + 1
	else:
		x = x + 1
print(z, x, c)


l = list(map(int, input().split()))

def throw_dice(a, b):
	fwin = 0
	swin = 0
	draw = 0
	for i in range(1, 7):
		if abs(a - i) < abs(b - i):
			fwin += 1
		elif abs(a - i) == abs(b - i):
			draw += 1
		else:
			swin += 1
	return [fwin, draw, swin]
print(' '.join((str(i) for i in throw_dice(l[0], l[1]))))


(a, b) = input().split(' ')
(a, b) = (int(a), int(b))
aplayer = 0
bplayer = 0
both = 0
for i in range(1, 7):
	if abs(i - a) < abs(i - b):
		aplayer += 1
	elif abs(i - b) < abs(i - a):
		bplayer += 1
	else:
		both += 1
print(aplayer, both, bplayer)


k = list(map(int, input().split()))
(f, s, w) = (0, 0, 0)
for i in range(1, 7):
	if abs(k[0] - i) < abs(k[1] - i):
		f += 1
	elif abs(k[0] - i) > abs(k[1] - i):
		s += 1
	else:
		w += 1
print(f, w, s)


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


(a, b) = map(int, input().split())
countA = countB = 0
for i in range(1, 7):
	if abs(a - i) < abs(b - i):
		countA += 1
	elif abs(b - i) < abs(a - i):
		countB += 1
print(countA, 6 - countA - countB, countB)


(a, b) = [int(x) for x in input().split()]
if a == b:
	print('0 6 0')
elif a > b:
	mid = a - b
	if mid % 2 == 0:
		mid = int((mid - 2) / 2)
		print(6 - a + 1 + mid, end=' ')
		print(1, end=' ')
		print(b + mid, end=' ')
	else:
		mid = int((mid - 1) / 2)
		print(6 - a + 1 + mid, end=' ')
		print(0, end=' ')
		print(b + mid, end=' ')
else:
	mid = b - a
	if mid % 2 == 0:
		mid = int((mid - 2) / 2)
		print(a + mid, end=' ')
		print(1, end=' ')
		print(6 - b + 1 + mid, end=' ')
	else:
		mid = int((mid - 1) / 2)
		print(a + mid, end=' ')
		print(0, end=' ')
		print(6 - b + 1 + mid, end=' ')


(a, b) = list(map(int, input().rstrip().split()))
(w1, d, w2) = [0] * 3
for i in range(1, 7):
	if abs(i - a) < abs(i - b):
		w1 += 1
	elif abs(i - a) > abs(i - b):
		w2 += 1
	else:
		d += 1
print(w1, d, w2, sep=' ')


inpt = input()
(a, b) = inpt.split()
a = int(a)
b = int(b)
(acnt, bcnt, dcnt) = (0, 0, 0)
for i in range(1, 7):
	if abs(a - i) < abs(b - i):
		acnt += 1
	elif abs(a - i) == abs(b - i):
		dcnt += 1
	else:
		bcnt += 1
print(acnt, dcnt, bcnt)


number = input('')
a = int(number[0])
b = int(number[2])

def dice(a, b):
	a_win = 0
	b_win = 0
	draw = 0
	for x in range(1, 7):
		if abs(a - x) < abs(b - x):
			a_win += 1
		elif abs(a - x) > abs(b - x):
			b_win += 1
		else:
			draw += 1
	return (a_win, draw, b_win)
result = dice(a, b)
print(result[0], result[1], result[2])


numbers = input().split()
x = int(numbers[0])
y = int(numbers[1])
xWins = 0
yWins = 0
draw = 0
for i in range(1, 7):
	if abs(i - x) < abs(i - y):
		xWins += 1
	elif abs(i - y) < abs(i - x):
		yWins += 1
	else:
		draw += 1
print(xWins, draw, yWins)


params = input()
(a, b) = [int(i) for i in params.split()]
a_wins = 0
b_wins = 0
draws = 0
for roll in range(1, 7):
	a_diff = abs(a - roll)
	b_diff = abs(b - roll)
	if a_diff < b_diff:
		a_wins += 1
	elif b_diff < a_diff:
		b_wins += 1
	else:
		draws += 1
print(a_wins, draws, b_wins)


def int_lst_input():
	return [int(val) for val in input().split(' ')]

def int_input():
	return int(input())

def print_lst(lst):
	print(' '.join([str(val) for val in lst]))

def solve():
	(a, b) = int_lst_input()
	result = [0, 0, 0]
	for i in range(1, 7):
		if abs(a - i) == abs(b - i):
			result[1] += 1
		elif abs(a - i) < abs(b - i):
			result[0] += 1
		else:
			result[2] += 1
	print_lst(result)
solve()


inp = input()
a = int(inp[0])
b = int(inp[2])
(a_win, b_win, draw) = (0, 0, 0)
for i in range(1, 7):
	a_score = abs(a - i)
	b_score = abs(b - i)
	if a_score == b_score:
		draw += 1
		continue
	if a_score < b_score:
		a_win += 1
		continue
	b_win += 1
print(a_win, draw, b_win)


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


(a, b) = map(int, input().split(' '))
first = 0
second = 0
draw = 0
for i in range(1, 7):
	c = max(i, a) - min(i, a)
	d = max(i, b) - min(i, b)
	if c < d:
		first = first + 1
	if d < c:
		second = second + 1
	if d == c:
		draw = draw + 1
print(first, draw, second)


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


(a, b) = [int(o) for o in input().split()]
count_1 = 0
count_2 = 0
count_3 = 0
for i in range(1, 7):
	if abs(a - i) < abs(b - i):
		count_1 += 1
	elif abs(a - i) > abs(b - i):
		count_2 += 1
	else:
		count_3 += 1
print(count_1, count_3, count_2)


z = list(map(int, input().split()))
a = 0
b = 0
dr = 0
d = [1, 2, 3, 4, 5, 6]
for i in d:
	if abs(z[0] - i) < abs(z[1] - i):
		a += 1
	elif abs(z[0] - i) == abs(z[1] - i):
		dr += 1
	else:
		b += 1
print(a, dr, b)


T_ON = 0
DEBUG_ON = 0
MOD = 998244353

def solve():
	(a, b) = read_ints()
	(x, y, z) = (0, 0, 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(x, z, y)

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 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 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):
		if n % i:
			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
main()


(p, q) = map(int, input().split())
result = [0, 0, 0]

def abs(x):
	if x < 0:
		return -x
	return x
for i in range(1, 7):
	if abs(i - p) < abs(i - q):
		result[0] += 1
	elif abs(i - p) > abs(i - q):
		result[2] += 1
	else:
		result[1] += 1
for i in result:
	print(i, end=' ')


def dice(a, b):
	a_win = 0
	draw = 0
	b_win = 0
	for i in range(1, 7):
		a_val = abs(a - i)
		b_val = abs(b - i)
		if a_val == b_val:
			draw += 1
		elif a_val > b_val:
			b_win += 1
		else:
			a_win += 1
	print(a_win, draw, b_win)
(a, b) = list(map(int, input().rstrip().split()))
dice(a, b)


(a, b) = (int(s) for s in input().split())
win1 = 0
win2 = 0
draw = 0
for i in range(1, 7):
	a_score = abs(a - i)
	b_score = abs(b - i)
	if a_score > b_score:
		win1 += 1
	elif a_score == b_score:
		draw += 1
	else:
		win2 += 1
print(win2, draw, win1)


inp = list(map(int, input().split()))
a = inp[0]
b = inp[1]
count = [1, 2, 3, 4, 5, 6]
counta = 0
draw = 0
countb = 0
for item in count:
	if abs(item - a) < abs(item - b):
		counta += 1
	elif abs(item - a) > abs(item - b):
		countb += 1
	else:
		draw += 1
print(counta, end=' ')
print(draw, end=' ')
print(countb)


(n, m) = map(int, input().split())
(W, D, L) = (0, 0, 0)
for i in range(1, 7):
	(d1, d2) = (abs(n - i), abs(m - i))
	if d1 == d2:
		D += 1
	if d1 < d2:
		W += 1
	if d1 > d2:
		L += 1
print(W, D, L)


inputArr = input().split(' ')
player1 = int(inputArr[0])
player2 = int(inputArr[1])
win = 0
lose = 0
draw = 0
for i in range(1, 7):
	if abs(player1 - i) < abs(player2 - i):
		win += 1
	elif abs(player2 - i) < abs(player1 - i):
		lose += 1
	else:
		draw += 1
print(str(win) + ' ' + str(draw) + ' ' + str(lose))


(a, b) = map(int, input().split())
ls = [0] * 3
for i in range(1, 7):
	ai = abs(a - i)
	bi = abs(b - i)
	if ai > bi:
		ls[2] += 1
	elif bi > ai:
		ls[0] += 1
	else:
		ls[1] += 1
print(*ls)


s = input()
(a, b) = s.split()
sample = [x for x in range(1, 7) if x != int(a) and x != int(b)]
timea = 0
timeb = 0
draw = 0
for x in sample:
	if abs(x - int(a)) < abs(x - int(b)):
		timea += 1
	elif abs(x - int(a)) > abs(x - int(b)):
		timeb += 1
	else:
		draw += 1
if int(a) == int(b):
	draw += 1
else:
	timea += 1
	timeb += 1
print(timea, draw, timeb)


(a, b) = list(map(int, input().rstrip().split()))
win = 0
draw = 0
lose = 0
for i in range(1, 7):
	diff_a = abs(a - i)
	diff_b = abs(b - i)
	if diff_a > diff_b:
		lose += 1
	elif diff_b == diff_a:
		draw += 1
	else:
		win += 1
print(win, draw, lose)


s = input().split()
a = int(s[0])
b = int(s[1])
f = 0
s = 0
d = 0
for i in range(1, 6 + 1):
	if abs(a - i) < abs(b - i):
		f += 1
	elif abs(a - i) > abs(b - i):
		s += 1
	else:
		d += 1
ans = str(f) + ' ' + str(d) + ' ' + str(s)
print(ans)


(a, b) = input().split(' ')
a = int(a)
b = int(b)
awin = 0
draw = 0
bwin = 0
for i in range(1, 7):
	if abs(a - i) < abs(b - i):
		awin += 1
	elif abs(a - i) > abs(b - i):
		bwin += 1
	else:
		draw += 1
print(' '.join([str(awin), str(draw), str(bwin)]))


x = input()
(x, y) = (int(x[0]), int(x[2]))
r1 = 0
r2 = 0
r3 = 0
for i in range(1, 7):
	if abs(x - i) < abs(y - i):
		r1 += 1
	elif abs(y - i) < abs(x - i):
		r3 += 1
	else:
		r2 += 1
print(r1, r2, r3)


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


(x, y) = input().split()
(a, b) = (int(x), int(y))
c = [1, 2, 3, 4, 5, 6]
(wina, draw, winb) = (0, 0, 0)
for i in c:
	if abs(a - i) < abs(b - i):
		wina = wina + 1
	elif abs(a - i) == abs(b - i):
		draw = draw + 1
	else:
		winb = winb + 1
print(wina, draw, winb)


s = input()
(a, b) = s.split()
a = int(a)
b = int(b)
awins = 0
draw = 0
bwins = 0
for i in range(1, 7):
	if abs(i - a) < abs(i - b):
		awins += 1
	elif abs(i - a) == abs(i - b):
		draw += 1
	else:
		bwins += 1
print(awins, draw, bwins)


(a, b) = (int(x) for x in input().split())
w = sum((1 for x in range(1, 7) if abs(a - x) < abs(b - x)))
d = sum((1 for x in range(1, 7) if abs(a - x) == abs(b - x)))
print(w, d, 6 - w - d)


line = input()
line = line.split()
a = int(line[0])
b = int(line[1])
win = 0
draw = 0
lose = 0
for i in range(1, 7):
	adif = a - i
	if adif < 0:
		adif = adif * -1
	bdif = b - i
	if bdif < 0:
		bdif = bdif * -1
	if adif < bdif:
		win = win + 1
	elif adif == bdif:
		draw = draw + 1
	else:
		lose = lose + 1
print(str(win) + ' ' + str(draw) + ' ' + str(lose))


import sys, bisect
from sys import stdin, stdout
from bisect import bisect_left, bisect_right, bisect, insort, insort_left, insort_right
from math import gcd, ceil, floor, sqrt
from collections import Counter, defaultdict, deque, OrderedDict
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 998244353
mod = 10 ** 9 + 7

def st():
	return list(stdin.readline().strip())

def inp():
	return int(stdin.readline())

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

def mp():
	return map(int, stdin.readline().split())

def pr(n):
	stdout.write(str(n) + '\n')

def solve():
	(a, b) = mp()
	l = [0, 0, 0]
	for i in range(1, 7):
		x = abs(a - i)
		y = abs(b - i)
		if x == y:
			l[1] += 1
		elif x < y:
			l[0] += 1
		else:
			l[2] += 1
	print(*l)
for _ in range(1):
	solve()


(a, b) = map(int, input().split())
c = (a + b) / 2
p = int(c)
l = p
r = 6 - p
m = 0
if c == a:
	l = 0
	m = 6
	r = 0
elif c - p == 0:
	m = 1
	l -= 1
if a > b:
	(l, r) = (r, l)
print(l, m, r)


def solve():
	(a, b) = [int(x) for x in input().split()]
	a_win = 0
	b_win = 0
	draw = 0
	for i in range(1, 7):
		if abs(a - i) < abs(b - i):
			a_win += 1
		elif abs(a - i) > abs(b - i):
			b_win += 1
		else:
			draw += 1
	print(f'{a_win} {draw} {b_win}')
	return
solve()


[a, b] = map(int, input().split())
dice = [1, 2, 3, 4, 5, 6]
firstWins = 0
secondWins = 0
drawGame = 0
for x in dice:
	if abs(a - x) > abs(b - x):
		secondWins = secondWins + 1
	elif abs(a - x) < abs(b - x):
		firstWins = firstWins + 1
	else:
		drawGame = drawGame + 1
print(firstWins, drawGame, secondWins)


(a, b) = map(int, input().split())
ans = [0, 0, 0]
for num in range(1, 7):
	if abs(num - a) < abs(num - b):
		ans[0] += 1
	elif abs(num - a) > abs(num - b):
		ans[2] += 1
	else:
		ans[1] += 1
print(ans[0], ans[1], ans[2])


(n, k) = map(int, input().split())
count1 = 0
count2 = 0
count3 = 0
for i in range(1, 7):
	s1 = abs(n - i)
	s2 = abs(k - i)
	if s1 < s2:
		count1 = count1 + 1
	if s1 > s2:
		count2 = count2 + 1
	if s1 == s2:
		count3 = count3 + 1
print(count1, end=' ')
print(count3, end=' ')
print(count2, end=' ')


(a, b) = input().split()
a = int(a)
b = int(b)
if a == b:
	print(0, 6, 0)
else:
	flag = a > b
	mid = (a + b) / 2
	if (a + b) % 2 == 0:
		r2 = 1
	else:
		r2 = 0
	r1 = int(mid - 1) + ((a + b) % 2 != 0)
	r3 = 6 - int(mid + 1) + 1
	if flag:
		(r1, r3) = (r3, r1)
	print(r1, r2, r3)


(x, y) = map(int, input().split())
c1 = 0
c2 = 0
d = 0
for i in range(1, 7):
	if abs(x - i) < abs(y - i):
		c1 = c1 + 1
	elif abs(y - i) < abs(x - i):
		c2 = c2 + 1
	elif abs(x - i) == abs(y - i):
		d = d + 1
print(c1, d, c2)


def solve(test):
	(a, b) = map(int, input().split())
	cnt = [0 for i in range(3)]
	for i in range(1, 7):
		if abs(a - i) > abs(b - i):
			cnt[2] += 1
		elif abs(a - i) < abs(b - i):
			cnt[0] += 1
		else:
			cnt[1] += 1
	print(*cnt)
t = 1
for _ in range(t):
	solve(_ + 1)


[a, b] = map(int, input().split())
n = abs(a - b)
if n == 1:
	n = 0
if n == 2:
	n = 0
if n == 3:
	n = 1
if n == 4:
	n = 1
if n == 5:
	n = 2
if a < b:
	x = a + n
	if (b - a) % 2 == 0:
		y = 1
	else:
		y = 0
	z = 7 - b + n
elif a == b:
	x = 0
	y = 6
	z = 0
elif a > b:
	x = 7 - a + n
	if (a - b) % 2 == 0:
		y = 1
	else:
		y = 0
	z = b + n
print(int(x), int(y), int(z))


s = input()
(a, b) = s.split()
a = int(a)
b = int(b)
x = y = z = 0
for i in range(1, 7):
	difA = abs(i - a)
	difB = abs(i - b)
	if difA < difB:
		x += 1
	elif difA > difB:
		z += 1
	else:
		y += 1
print(x, y, z)


(a, b) = list(map(int, input().split()))
wins = 0
draws = 0
losses = 0
for i in range(1, 7):
	ascore = abs(a - i)
	bscore = abs(b - i)
	if ascore < bscore:
		wins += 1
	elif ascore > bscore:
		losses += 1
	else:
		draws += 1
print(f'{wins} {draws} {losses}')


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


import sys
import math
(a, b) = [int(x) for x in sys.stdin.readline().split()]
t1 = 0
t2 = 0
t3 = 0
for i in range(1, 7):
	if math.fabs(a - i) < math.fabs(b - i):
		t1 += 1
	elif math.fabs(a - i) == math.fabs(b - i):
		t2 += 1
	else:
		t3 += 1
print(str(t1) + ' ' + str(t2) + ' ' + str(t3))


def dice_roll(line):
	numbers = line.split()
	a = int(numbers[0])
	b = int(numbers[1])
	a_win = 0
	b_win = 0
	tie = 0
	for i in range(1, 7):
		if abs(a - i) < abs(b - i):
			a_win += 1
		elif abs(a - i) == abs(b - i):
			tie += 1
		elif abs(a - i) > abs(b - i):
			b_win += 1
	return (a_win, tie, b_win)
solution = dice_roll(input())
print(str(solution[0]) + ' ' + str(solution[1]) + ' ' + str(solution[2]))


import math

def go(a, b):
	if a == b:
		return (0, 6, 0)
	if a < b:
		(l, h) = (a, b)
	else:
		(l, h) = (b, a)
	mid = (a + b) / 2
	floor_mid = math.floor(mid)
	if mid == floor_mid:
		draw = 1
		first = floor_mid - 1
		second = 6 - floor_mid
	else:
		draw = 0
		first = floor_mid
		second = 6 - floor_mid
	if a < b:
		return (first, draw, second)
	else:
		return (second, draw, first)
print(' '.join(map(str, go(*[int(_) for _ in input().split()]))))


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


(n, m) = map(int, input().split())
l = [1, 2, 3, 4, 5, 6]
q = 0
w = 0
e = 0
for i in l:
	n1 = abs(n - i)
	m1 = abs(m - i)
	if n1 > m1:
		e += 1
	elif m1 > n1:
		q += 1
	else:
		w += 1
print(q, w, e)


string = input().split(' ')
a = int(string[0])
b = int(string[1])
awin = 0
bwin = 0
draw = 0
for i in range(1, 7):
	adiff = abs(a - i)
	bdiff = abs(b - i)
	if adiff > bdiff:
		bwin += 1
	elif bdiff > adiff:
		awin += 1
	else:
		draw += 1
print(awin, draw, bwin)


(a, b) = [int(s) for s in input().split()]
A = 0
B = 0
T = 0
for i in range(1, 7):
	if abs(a - i) < abs(b - i):
		A += 1
	elif abs(a - i) == abs(b - i):
		T += 1
	else:
		B += 1
print(A, T, B)


(F, S) = map(int, input().split())
if F == S:
	print(0, 6, 0)
elif abs(F - S) % 2 == 1:
	if F < S:
		F = F + (abs(F - S) - 1) // 2
		print(F, 0, 6 - F)
	else:
		S = S + (abs(F - S) - 1) // 2
		print(6 - S, 0, S)
elif F < S:
	F = F + (abs(F - S) // 2 - 1)
	print(F, 1, 6 - F - 1)
else:
	S = S + (abs(F - S) // 2 - 1)
	print(6 - S - 1, 1, S)


import sys

def main():
	(a, b) = map(int, sys.stdin.read().strip().split())
	(n1, n2, d) = (0, 0, 0)
	for i in range(1, 7):
		dt1 = abs(i - a)
		dt2 = abs(i - b)
		n1 += dt1 < dt2
		n2 += dt1 > dt2
		d += dt1 == dt2
	return (n1, d, n2)
print(*main())


(a, b) = map(int, input().split())
arr = list(range(1, 7))
(beg, mid, end) = (0, 0, 0)
for num in arr:
	if abs(num - a) == abs(num - b):
		mid += 1
	elif abs(num - a) < abs(num - b):
		beg += 1
	else:
		end += 1
print(beg, mid, end)


from math import *
from cmath import *
from itertools import *
from decimal import *
from fractions import *
from sys import *
from types import CodeType, new_class
(a, b) = map(int, input().split())
cnt1 = cnt2 = cnt3 = 0
for x in range(1, 7):
	cnt1 += abs(a - x) < abs(b - x)
	cnt2 += abs(a - x) == abs(b - x)
	cnt3 += abs(a - x) > abs(b - x)
print(cnt1, cnt2, cnt3)


(n, k) = map(int, input().split())
(a, b, lose) = (0, 0, 0)
for i in range(1, 7):
	if abs(n - i) < abs(k - i):
		a = a + 1
	if abs(n - i) > abs(k - i):
		b = b + 1
	if abs(n - i) == abs(k - i):
		lose = lose + 1
print(a, lose, b)


[a, b] = map(int, input().split())
c = abs(a - b)
if c % 2 == 0:
	if c == 0:
		d = 0
		x = 6
		e = 0
	else:
		x = 1
		if a > b:
			d = c // 2 + (6 - a)
			e = 6 - x - d
		if a < b:
			d = c // 2 + (a - 1)
			e = 6 - x - d
else:
	x = 0
	if a > b:
		d = c // 2 + (7 - a)
		e = 6 - x - d
	if a < b:
		d = c // 2 + a
		e = 6 - x - d
print(d, x, e)


def dices():
	players_choice = input().split()
	player1 = draw = player2 = 0
	if players_choice[0] == players_choice[1]:
		print(0, 6, 0)
		return
	for i in range(1, 7):
		if abs(i - int(players_choice[0])) < abs(i - int(players_choice[1])):
			player1 += 1
		elif abs(i - int(players_choice[0])) > abs(i - int(players_choice[1])):
			player2 += 1
		else:
			draw += 1
	print(player1, draw, player2)
dices()


def main():
	while True:
		try:
			(a, b) = map(int, input().split())
			countA = 0
			countB = 0
			draw = 0
			for i in range(1, 7):
				if abs(a - i) < abs(b - i):
					countA += 1
				elif abs(a - i) == abs(b - i):
					draw += 1
				else:
					countB += 1
			print(countA, end=' ')
			print(draw, end=' ')
			print(countB)
		except:
			break
main()


x = [int(i) for i in input().split()]
a = x[0]
b = x[1]
a_p = 0
b_p = 0
draw = 0
for i in range(1, 7):
	diffA = abs(a - i)
	diffB = abs(b - i)
	if diffA < diffB:
		a_p += 1
	elif diffB < diffA:
		b_p += 1
	else:
		draw += 1
print(a_p, draw, b_p)


(a, b) = map(int, input().split())
ac = bc = c = 0
for i in range(1, 7):
	if abs(a - i) > abs(b - i):
		ac += 1
	elif abs(a - i) < abs(b - i):
		bc += 1
	else:
		c += 1
print('{} {} {}'.format(bc, c, ac))


[a, b] = [int(x) for x in input().split(' ')]
waya = 0
wayb = 0
wayd = 0
for i in range(1, 7):
	if abs(a - i) < abs(b - i):
		waya += 1
	elif abs(a - i) > abs(b - i):
		wayb += 1
	elif abs(a - i) == abs(b - i):
		wayd += 1
print(waya, wayd, wayb)


(a, b) = map(int, input().split())
counta = 0
countb = 0
countc = 0
for i in range(1, 7):
	if abs(a - i) > abs(i - b):
		countb += 1
	if abs(i - a) < abs(i - b):
		counta += 1
	if abs(i - a) == abs(i - b):
		countc += 1
print(counta, countc, countb)


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


(a, b) = list(map(int, input().split()))
(wina, winb, winab) = (0, 0, 0)
for x in range(1, 7):
	if abs(a - x) < abs(b - x):
		wina += 1
	elif abs(a - x) > abs(b - x):
		winb += 1
	else:
		winab += 1
print(wina, winab, winb)


(a, b) = map(int, input().split())
k = [1, 2, 3, 4, 5, 6]
c1 = 0
c2 = 0
c3 = 0
for i in k:
	if abs(a - i) < abs(b - i):
		c1 += 1
	elif abs(a - i) > abs(b - i):
		c2 += 1
	else:
		c3 += 1
print(c1, c3, c2)


entry = input()
(a, b) = entry.split(' ')
a = int(a)
b = int(b)
i = 1
f = 0
s = 0
t = 0
for i in range(1, 7):
	x = abs(a - i)
	y = abs(b - i)
	if x < y:
		f = f + 1
	elif x > y:
		s = s + 1
	elif x == y:
		t = t + 1
	i = i + 1
print(str(f) + ' ' + str(t) + ' ' + str(s))


__copyright__ = ''
__author__ = 'Son-Huy TRAN'
__email__ = 'sonhuytran@gmail.com'
__doc__ = ''
__version__ = '1.0'

def count_cases(a: int, b: int) -> list:
	count = [0, 0, 0]
	for i in range(1, 7):
		if abs(a - i) < abs(b - i):
			count[0] += 1
		elif abs(a - i) == abs(b - i):
			count[1] += 1
		else:
			count[2] += 1
	return count

def main() -> int:
	(a, b) = map(int, input().split())
	print(' '.join([str(i) for i in count_cases(a, b)]))
	return 0
exit(main())


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


inn = list(map(int, input().split()))
a = inn[0]
b = inn[1]
a_win = 0
b_win = 0
for i in range(1, 7):
	if abs(a - i) < abs(b - i):
		a_win += 1
	elif abs(a - i) > abs(b - i):
		b_win += 1
output = [a_win, 6 - a_win - b_win, b_win]
print(*output)


a = input().split()
first = int(a[0])
second = int(a[1])
f_win = 0
s_win = 0
same = 0
for i in range(1, 7):
	if abs(i - first) == abs(i - second):
		same += 1
	elif abs(i - first) < abs(i - second):
		f_win += 1
	else:
		s_win += 1
print(f_win, same, s_win)