def main():
for _ in range(int(input())):
A, B = map(int, input().split())
amounts = []
for i in range(A // 11 + 1):
amounta = min(A, 11)
amountb = min(B, 10)
amounts.append((amounta, amountb))
A -= amounta
B -= amountb
if A == 0:
if B != 0:
print("-1 -1")
break
else:
for j in amounts:
print(j[0], j[1])
break
main()
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Wrong answer | 16ms | 2988 KiB | ||||
subtask2 | 20/20 | ||||||
2 | Accepted | 16ms | 3128 KiB | ||||
subtask3 | 0/30 | ||||||
3 | Wrong answer | 18ms | 3112 KiB | ||||
subtask4 | 0/50 | ||||||
4 | Wrong answer | 32ms | 3128 KiB | ||||
5 | Wrong answer | 35ms | 3088 KiB | ||||
6 | Wrong answer | 39ms | 3128 KiB |