using System; public class Hello { public static void Main() { var s = Console.ReadLine().Trim(); var a = ""; var b = ""; for (int i = 0; i < s.Length; i++) { if (s[i] == '7') { a += "3"; b += "4"; } else { a += s[i]; b += "0"; } } var a2 = long.Parse(a); var b2 = long.Parse(b); Console.WriteLine("{0} {1}", a2, b2); } }