boolean (int result12, int result23, int result31) { if (result12 == 0 && result23 == 0 && result31 == 0) return true; if (result12 > 0 && result23 > 0 && result31 > 0) return false; if (result12 < 0 && result23 < 0 && result31 < 0) return false; if (result12 == 0 && Integer.signum(result23) * Integer.signum(result31) >= 0) return false; if (result23 == 0 && Integer.signum(result12) * Integer.signum(result31) >= 0) return false; if (result31 == 0 && Integer.signum(result23) * Integer.signum(result12) >= 0) return false; return true; }