module Yuki open System let solve a b = let rec isA ax bx = match ax, bx with | 7L :: _, 4L :: _ -> false | 4L :: _, 7L :: _ -> true | a :: ax, b :: bx -> if a > b then true elif a < b then false else isA ax bx | ax, [] -> failwith "" | [], bx -> failwith "" let a' = string a let b' = string b if a'.Length > b'.Length then a elif a'.Length < b'.Length then b else let a'' = a'.ToCharArray() |> Array.map (string>>int64) |> Array.toList let b'' = b'.ToCharArray() |> Array.map (string>>int64) |> Array.toList if isA a'' b'' then a else b let A, B = let t = Console.ReadLine().Split() |> Array.map int64 t.[0], t.[1] solve A B |> Console.WriteLine