from math import *
x = float(input())
if x < -5 or x > 5:
F = 1/(5-pow(x,2))
elif -5 <= x <= 5:
F = cos (x)
print (F)
from math import *
x = float(input())
if x < -5 or x > 5:
F = 1/(5-pow(x,2))
elif -5 <= x <= 5:
F = cos (x)
print (F)