using System;
public class Program
{
public static void Main()
double num1=int.Parse(Console.ReadLine());
Console.WriteLine("enter the number");
double ah=num1%10 ;
double a=(int)num1/10 ;
double f=Math.Pow(ah,a) ;
double n=Math.Pow(a,ah) ;
Console.WriteLine("the max num is {0}", Math.Max(n,f)) ;
}