public void solve() throws IOException {
    int x0 = nextInt();
    int y0 = nextInt();
    int x1 = nextInt();
    int y1 = nextInt();

    int xdiff = Math.abs(x0 - x1);
    int ydiff = Math.abs(y0 - y1);

    if (xdiff == 0) {
      x0 += ydiff;
      x1 += ydiff;
    } else if (ydiff == 0) {
      y0 += xdiff;
      y1 += xdiff;
    } else if (xdiff == ydiff) {
      int botx = Math.min(x0, x1);
      int boty = Math.min(y0, y1);
      x0 = botx;
      y0 = boty + ydiff;
      x1 = botx + ydiff;
      y1 = boty;
    } else {
      System.out.println(-1);
      return;
    }
    System.out.println(x0 + " " + y0 + " " + x1 + " " + y1);

  }