using System;
public class Program
{
public static void Main()
int x;
double y1,y2;
x=int.Parse(Console.ReadLine()) ;
y1= 4-6*Math.Sqrt(Math.Abs(Math.Pow(x,2)-1)+4);
y2=Math.Sqrt(Math.Pow(x-4,4)+Math.Pow(3-x,2));
Console.WriteLine("y1={0},y2={1}",y1,y2);
}