oklad = int(input())
procent = int(input())
nalog = oklad*procent/100
summa = oklad-nalog
print(nalog, summa)
oklad = int(input())
procent = int(input())
nalog = oklad*procent/100
summa = oklad-nalog
print(nalog, summa)