import java.io.*;
import java.util.*;

public class GenLess {
    public static void main(String[] args) throws IOException {
        Random random = new Random(Integer.parseInt(args[0]));
        int den = 1 + random.nextInt(1000000000);
        int nom = 1 + random.nextInt(den - 1);
        System.out.println(nom + " " + den);
    }
}