Почему не работает такой вариант с отрицательными числами? package com.javarush.task.task04.task0419; /* Максимум четырех чисел */ import java.io.*; import java.util.*; public class Solution { public static void main(String[] args) throws Exception { BufferedReader reader = new BufferedReader (new InputStreamReader (System.in)); String sa = reader.readLine(); String sb = reader.readLine(); String sc = reader.readLine(); String sd = reader.readLine(); int a = Integer.parseInt (sa); int b = Integer.parseInt (sb); int c = Integer.parseInt (sa); int d = Integer.parseInt (sb); int max, max2; if (a >= b) max = a; else max = b; if (c >= d) max2 = c; else max2 = d; if (max >= max2) System.out.println(max); else System.out.println(max2); } }