подскажите как выполнить последнее условие, устал голову ломать.
package com.javarush.task.task04.task0419;
import java.io.*;
import java.lang.Math;
/*
Максимум четырех чисел
*/
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
int a = Integer.parseInt(buf.readLine());
int b = Integer.parseInt(buf.readLine());
int c = Integer.parseInt(buf.readLine()); //напишите тут ваш код
int d = Integer.parseInt(buf.readLine());
int max1 = Math.max(a,b);
int max2 = Math.max(c,d);
if(max1<max2)
System.out.println(max2);
else
System.out.println(max1);
if(max1==max2)
System.out.println(max1);
}
}