Пробую на разных числах и работает, но проверка не проходит
из смешного, что та же ошибка высвечивается если скопировать правильное решение
Подскажите, что не так
package com.javarush.task.task04.task0419;
import java.io.BufferedReader;
import java.io.InputStreamReader;
/*
Максимум четырех чисел
*/
public class Solution {
public static void main(String[] args) throws Exception {
//напишите тут ваш код
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String s1 = reader.readLine();
int x = Integer.parseInt(s1);
String s2 = reader.readLine();
int y = Integer.parseInt(s2);
String s3 = reader.readLine();
int c = Integer.parseInt(s3);
String s4 = reader.readLine();
int d = Integer.parseInt(s3);
if ((x >=y) && (c >= d))
{
if (x>=c)
{
System.out.println(x);
}
else
{
System.out.println(c);
}
}
else
{
if ((x<=y) && (c>=d))
{
if (y >= c)
{
System.out.println(y);
}
else
{
System.out.println(c);
}
}
else
{
if ((x >= y) && (c <=d))
{
if (x>=d)
{
System.out.println(x);
}
else
{
System.out.println(d);
}
}
else
{
if
((x <= y) && (c <=d))
{
if (y >= d)
{
System.out.println(y);
}
else
{
System.out.println(d);
}
}
}
}
}
}
}