public class Solution { public static void main(String[] args) throws Exception { Scanner sc1 = new Scanner(System.in); int x = sc1.nextInt() ; int y = sc1.nextInt(); int z = sc1.nextInt(); int w = sc1.nextInt(); int a = math(x, y); int b = math(z, w); int c = math(a, b); System.out.println(c); public static int math(int number 1,int number 2) { if (number 1 > number 2) return number 1; else return number 2; } } }