import java.util.Random; import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); Random ra = new Random(); int n = sc.nextInt(); boolean f = true; int a = 0; int b = 0; do{ a = ra.nextInt(n); b = n - a; if(!String.valueOf(a).contains("7") && !String.valueOf(b).contains("7")) { f = false; } }while(f); System.out.println(a + " " + b); } }