public void solve() throws IOException {
    double L = nextDouble();
    double K = nextDouble();
    double T1 = nextDouble();
    double T2 = nextDouble();
    double H = nextDouble();

    if (H < L) {
      double ans = H;
      System.out.println(ans + " " + ans);
    } else {
      ArrayList<Double> possibilities = new ArrayList<Double>(3);
      if (H == L) {
        possibilities.add(H);
      }
      double a = T1;
      double b = -1 * (K * T1 + K * T2 + H);
      double c = K * L;
      double disc = Math.sqrt(b * b - 4 * a * c);

      double pos = (-1 * b + disc) / (2 * a);
      if (pos >= K && pos * T1 >= L) {
        possibilities.add(pos * T1);
      }

      pos = (-1 * b - disc) / (2 * a);
      if (pos >= K && pos * T1 >= L) {
        possibilities.add(pos * T1);
      }

      System.out.println(Collections.min(possibilities) + " " + Collections.max(possibilities));
    }

  }