require'matrix' A=Matrix[[1,1],[1,0]] def f(n) (A**n)[1,0] end puts (n=gets.to_i)==2?[3,:INF]:[n,f(n)-(n%2>0?0:f(n/2)**2)]