@@ -0,0 +1,1343 @@
+//Java template for fast I/O%0A%0Aimport java.io.InputStream;%0Aimport java.io.InputStreamReader;%0Aimport java.io.BufferedReader;%0Aimport java.io.OutputStream;%0Aimport java.io.PrintWriter;%0Aimport java.io.IOException;%0Aimport java.util.StringTokenizer;%0A%0Apublic class Main%0A%7B%0A%09public static void main(String%5B%5D args)%0A    %7B%0A%09%09InputStream inputStream = System.in;%0A%09%09OutputStream outputStream = System.out;%0A%09%09InputReader in = new InputReader(inputStream);%0A%09%09PrintWriter out = new PrintWriter(outputStream);%0A%09%09Task solver = new Task();%0A%09%09solver.solve(1, in, out);%0A%09%09out.close();%0A%09%7D%0A%7D%0A%0Aclass Task%0A%7B%0A    public void solve(int testNumber, InputReader in, PrintWriter out)%0A    %7B%0A%0A    %7D%0A%7D%0A%0Aclass InputReader%0A%7B%0A    public BufferedReader reader;%0A    public StringTokenizer tokenizer;%0A%0A    public InputReader(InputStream stream)%0A    %7B%0A        reader = new BufferedReader(new InputStreamReader(stream), 32768);%0A        tokenizer = null;%0A    %7D%0A%0A    public String next()%0A    %7B%0A        while (tokenizer == null %7C%7C !tokenizer.hasMoreTokens())%0A        %7B%0A            try %7B%0A                tokenizer = new StringTokenizer(reader.readLine());%0A            %7D catch (IOException e) %7B%0A                throw new RuntimeException(e);%0A            %7D%0A        %7D%0A        return tokenizer.nextToken();%0A    %7D%0A%0A    public int nextInt()%0A    %7B%0A        return Integer.parseInt(next());%0A    %7D%0A%0A%7D%0A

Create Main.java