from math import floor as chao
from math import ceil as cezin
while True:
    x=int(input())
    if x==0:break
    brasa=chao(x/90)
    alema=cezin(7*x/90)
    print(f"Brasil {brasa} x Alemanha {alema}")

from math import floor as chao
from math import ceil as cezin
while True:
    x=int(input())
    if x==0:break
    brasa=chao(x/90)
    alema=cezin(7*x/90)
    print(f"Brasil {brasa} x Alemanha {alema}")
