// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.io.*;

public class Notepad {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        System.out.print("Enter number: ");
        int n = Integer.parseInt(br.readLine());
        PrintWriter pw = new PrintWriter(new FileOutputStream("C:\\z.z"));
        for(int i = 1; i <= n; i++) {
            for(int j = 1; j <= n; j++) {
                pw.print(" " + i*j);
            }
            pw.println();
        }
        pw.flush();
        pw.close();
        Runtime.getRuntime().exec("notepad C:\\z.z");
    }
}
