public boolean check(long s, long a, long b) {
    boolean f = false;
    if (a * b >= s) {
      f = true;
      System.out.println(a * b + "\n" + a + " " + b);
      return f;
    }
    if (a < b) {
      long temp = a;
      a = b;
      b = temp;
    }
    for (long i = 1; i <= Math.sqrt(s); i++) {
      if ((s % i == 0) && (i >= a && s / i >= b)) {
        System.out.println(s + "\n" + i + " " + s / i);
        return true;
      }
    }
    return false;
  }