import java.util.Scanner;public class BJ1476 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int E = sc.nextInt(); // 지구를 나타내는 수 int S = sc.nextInt(); // 태양을 나타내는 수 int M = sc.nextInt(); // 달을 나타내는 수 int year = 1; // 우리가 알고 있는 연도, 1부터 시작 int e = 1, s = 1, m = 1; // 각각의 수를 1로 초기화 while (true) { // E, S,..