public static void main(String[] args) {
        if (args.length != 2) {
            System.out.println("Usage: java Main <input file> <output file>");
        } else {
            String input = args[0];
            String output = args[1];
            try (Scanner scanner = new Scanner(new File(input))) {
                Matrix a = new Matrix(scanner);
                Matrix b = new Matrix(scanner);
                Matrix c = new Matrix(scanner);
                Matrix result = a.multiply(a).add(b.multiply(c));
                try {
                    result.write(new File(output));
                } catch (IOException exception) {
                    System.out.println("Error while writing matrix");
                }
            } catch (FileNotFoundException exception) {
                System.out.println("File not found: " + input);
            }
        }
    }