x=float(input())
m1=m2=0
if (x<0):
print("error")
else:
n=x-5000
if (x==0):
m1=m2=0
elif (n<=3000):
n=abs(n)
m1=n*0.03
m2=n-m1+5000
elif(3000<n<=12000):
n=abs(n)
m1=n*0.1-210
m2=n-m1+5000
elif(12000<n<=25000):
m1=n*0.2-1410
m2=n-m1+5000
elif(25000<n<=35000):
m1=n*0.25-2660
m2=n-m1+5000
elif(35000<n<=55000):
m1=n*0.3-4410
m2=n-m1+5000
elif(55000<n<=80000):
m1=n*0.35-7160
m2=n-m1+5000
elif(n>80000):
m1=n*0.45-15160
m2=n-m1+5000
print("应缴税款{:.2f}元,实发工资{:.2f}元。".format(m1,m2))