@@ -0,0 +1,843 @@
+package com.javarush.task.task14.task1420;%0A%0A/* %0A%D0%9D%D0%9E%D0%94%0A*/%0A%0Aimport java.io.BufferedReader;%0Aimport java.io.InputStreamReader;%0A%0Apublic class Solution %7B%0A    public static void main(String%5B%5D args) throws Exception %7B%0A        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));%0A        int firstNumber, secondNumber;%0A%0A        firstNumber = Integer.parseInt(reader.readLine());%0A        secondNumber = Integer.parseInt(reader.readLine());%0A        if (firstNumber %3C 1 %7C%7C secondNumber %3C 1) %7B%0A            reader.close();%0A            throw new Exception();%0A        %7D%0A        System.out.println(GCD(firstNumber, secondNumber));%0A        reader.close();%0A    %7D%0A%0A%0A%0A    private static int GCD(int a, int b) %7B%0A        while (b != 0) %7B%0A            int tmp = a %25 b;%0A            a = b;%0A            b = tmp;%0A        %7D%0A        return a;%0A    %7D%0A%7D%0A

Complete task1420