Problem: There is a chess tournament in All-Right-City. n players were invited to take part in the competition. The tournament is held by the following rules:

  1. Initially, each player plays one game with every other player. There are no ties; 
  2. After that, the organizers build a complete directed graph with players as vertices. For every pair of players there is exactly one directed edge between them: the winner of their game is the startpoint of this edge and the loser is the endpoint; 
  3. After that, the organizers build a condensation of this graph. The condensation of this graph is an acyclic complete graph, therefore it has the only Hamiltonian path which consists of strongly connected components of initial graph A1 → A2 → ... → Ak. 
  4. The players from the first component A1 are placed on the first <image> places, the players from the component A2 are placed on the next <image> places, and so on. 
  5. To determine exact place of each player in a strongly connected component, all the procedures from 1 to 5 are repeated recursively inside each component, i.e. for every i = 1, 2, ..., k players from the component Ai play games with each other again, and so on; 
  6. If a component consists of a single player, then he has no more rivals, his place is already determined and the process stops. 



The players are enumerated with integers from 1 to n. The enumeration was made using results of a previous tournament. It is known that player i wins player j (i < j) with probability p.

You need to help to organize the tournament. Find the expected value of total number of games played by all the players. 

It can be shown that the answer can be represented as <image>, where P and Q are coprime integers and <image>. Print the value of P·Q - 1 modulo 998244353.

If you are not familiar with any of the terms above, you can read about them [here](https://en.wikipedia.org/wiki/Strongly_connected_component).

Input

The first line of input contains a single integer n (2 ≤ n ≤ 2000) — the number of players.

The second line contains two integers a and b (1 ≤ a < b ≤ 100) — the numerator and the denominator of fraction <image>.

Output

In the only line print the expected value of total number of games played by all the players. Print the answer using the format above.

Examples

Input

3
1 2


Output

4


Input

3
4 6


Output

142606340


Input

4
1 2


Output

598946623

Note

In the first example the expected value is 4.

In the second example the expected value is <image>.

In the third example the expected value is <image>.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
template <typename T, typename = std::true_type>
struct IdentityHelper;
template <typename T>
struct IdentityHelper<T, typename std::is_arithmetic<T>::type> {
  static T identity() { return 1; }
};
template <typename T>
T identity() {
  return IdentityHelper<T>::identity();
}
template <typename T>
T extendedGcd(T a, T b, T& x, T& y) {
  if (a == 0) {
    x = 0;
    y = 1;
    return b;
  }
  T d = extendedGcd(b % a, a, y, x);
  x -= (b / a) * y;
  return d;
}
template <typename T>
class Zn {
 public:
  Zn() : value(0) {}
  static Zn valueOf(int value) {
    int x = value % mod();
    if (x < 0) {
      x += mod();
    }
    return Zn(x);
  }
  static Zn valueOf(long long value) {
    int x = static_cast<int>(value % mod());
    if (x < 0) {
      x += mod();
    }
    return Zn(x);
  }
  static Zn rawValueOf(int value) {
    ;
    return Zn(value);
  }
  Zn& operator=(int rhs) { return *this = Zn::valueOf(rhs); }
  Zn& operator=(long long rhs) { return *this = Zn::valueOf(rhs); }
  Zn& operator+=(const Zn& rhs) {
    value += rhs.value;
    if (value >= mod()) {
      value -= mod();
    }
    return *this;
  }
  Zn& operator+=(int rhs) { return *this += Zn::valueOf(rhs); }
  Zn& operator+=(long long rhs) { return *this += Zn::valueOf(rhs); }
  Zn& operator-=(const Zn& rhs) {
    value -= rhs.value;
    if (value < 0) {
      value += mod();
    }
    return *this;
  }
  Zn& operator-=(int rhs) { return *this -= Zn::valueOf(rhs); }
  Zn& operator-=(long long rhs) { return *this -= Zn::valueOf(rhs); }
  Zn& operator*=(const Zn& rhs) {
    long long result =
        static_cast<long long>(value) * static_cast<long long>(rhs.value);
    value = static_cast<int>(result % mod());
    return *this;
  }
  Zn& operator*=(int rhs) { return *this *= Zn::valueOf(rhs); }
  Zn& operator*=(long long rhs) { return *this *= Zn::valueOf(rhs); }
  Zn operator-() const {
    if (value == 0) {
      return *this;
    } else {
      return Zn(mod() - value);
    }
  }
  Zn& operator/=(const Zn& rhs) { return *this *= rhs.inversed(); }
  Zn& operator/=(int rhs) { return *this /= Zn::valueOf(rhs); }
  Zn& operator/=(long long rhs) { return *this /= Zn::valueOf(rhs); }
  bool operator==(const Zn& rhs) const { return value == rhs.value; }
  Zn inversed() const {
    ;
    int x, y;
    int gcd = extendedGcd(value, mod(), x, y);
    (void)gcd;
    ;
    if (x < 0) {
      x += mod();
    }
    return Zn(x);
  }
  template <typename U>
  friend std::ostream& operator<<(std::ostream&, const Zn<U>& zn);
  template <typename U>
  friend std::istream& operator>>(std::istream&, Zn<U>& zn);
  int intValue() const { return value; }

 private:
  explicit Zn(int value) : value(value) {}
  int value;
  constexpr static int mod() { return T::value; }
  template <int N = T::value>
  static constexpr bool positive_or_runtime(int) {
    return N > 0;
  }
  static constexpr bool positive_or_runtime(...) { return true; }
  static_assert(
      std::is_same<typename std::decay<decltype(T::value)>::type, int>::value,
      "T::value must be int");
  static_assert(positive_or_runtime(0), "Mod has to be positive integer");
};
template <typename T>
bool operator==(const Zn<T>& lhs, int rhs) {
  return lhs == Zn<T>::valueOf(rhs);
}
template <typename T>
bool operator==(int lhs, const Zn<T>& rhs) {
  return rhs == lhs;
}
template <typename T>
bool operator==(const Zn<T>& lhs, long long rhs) {
  return lhs == Zn<T>::valueOf(rhs);
}
template <typename T>
bool operator==(long long lhs, Zn<T>& rhs) {
  return rhs == lhs;
}
template <typename T>
bool operator!=(const Zn<T>& lhs, const Zn<T>& rhs) {
  return !(lhs == rhs);
}
template <typename T>
bool operator!=(const Zn<T>& lhs, int rhs) {
  return !(lhs == rhs);
}
template <typename T>
bool operator!=(int lhs, const Zn<T>& rhs) {
  return !(lhs == rhs);
}
template <typename T>
bool operator!=(const Zn<T>& lhs, long long rhs) {
  return !(lhs == rhs);
}
template <typename T>
bool operator!=(long long rhs, const Zn<T>& lhs) {
  return !(lhs == rhs);
}
template <typename T>
Zn<T> operator+(const Zn<T>& lhs, const Zn<T>& rhs) {
  Zn<T> copy = lhs;
  return copy += rhs;
}
template <typename T>
Zn<T> operator+(const Zn<T>& lhs, int rhs) {
  Zn<T> copy = lhs;
  return copy += rhs;
}
template <typename T>
Zn<T> operator+(int lhs, const Zn<T>& rhs) {
  return rhs + lhs;
}
template <typename T>
Zn<T> operator+(const Zn<T>& lhs, long long rhs) {
  Zn<T> copy = lhs;
  return copy += rhs;
}
template <typename T>
Zn<T> operator+(long long lhs, const Zn<T>& rhs) {
  return rhs + lhs;
}
template <typename T>
Zn<T> operator-(const Zn<T>& lhs, const Zn<T>& rhs) {
  Zn<T> copy = lhs;
  return copy -= rhs;
}
template <typename T>
Zn<T> operator-(const Zn<T>& lhs, int rhs) {
  Zn<T> copy = lhs;
  return copy -= rhs;
}
template <typename T>
Zn<T> operator-(int lhs, const Zn<T>& rhs) {
  return Zn<T>::valueOf(lhs) - rhs;
}
template <typename T>
Zn<T> operator-(const Zn<T>& lhs, long long rhs) {
  Zn<T> copy = lhs;
  return copy -= rhs;
}
template <typename T>
Zn<T> operator-(long lhs, const Zn<T>& rhs) {
  return Zn<T>::valueOf(lhs) - rhs;
}
template <typename T>
Zn<T> operator*(const Zn<T>& lhs, const Zn<T>& rhs) {
  Zn<T> copy = lhs;
  return copy *= rhs;
}
template <typename T>
Zn<T> operator*(const Zn<T>& lhs, int rhs) {
  Zn<T> copy = lhs;
  return copy *= rhs;
}
template <typename T>
Zn<T> operator*(int lhs, const Zn<T>& rhs) {
  return rhs * lhs;
}
template <typename T>
Zn<T> operator*(const Zn<T>& lhs, long long rhs) {
  Zn<T> copy = lhs;
  return copy *= rhs;
}
template <typename T>
Zn<T> operator*(long long lhs, const Zn<T>& rhs) {
  return rhs * lhs;
}
template <typename T>
Zn<T> operator/(const Zn<T>& lhs, const Zn<T>& rhs) {
  Zn<T> copy = lhs;
  return copy /= rhs;
}
template <typename T>
Zn<T> operator/(const Zn<T>& lhs, int rhs) {
  Zn<T> copy = lhs;
  return copy /= rhs;
}
template <typename T>
Zn<T> operator/(int lhs, const Zn<T>& rhs) {
  return Zn<T>::valueOf(lhs) / rhs;
}
template <typename T>
Zn<T> operator/(const Zn<T>& lhs, long long rhs) {
  Zn<T> copy = lhs;
  return copy /= rhs;
}
template <typename T>
Zn<T> operator/(long long lhs, const Zn<T>& rhs) {
  return Zn<T>::valueOf(lhs) / rhs;
}
template <typename T>
std::ostream& operator<<(std::ostream& stream, const Zn<T>& zn) {
  return stream << zn.value;
}
template <typename T>
std::istream& operator>>(std::istream& stream, Zn<T>& zn) {
  long long value;
  stream >> value;
  zn.value = static_cast<int>(value % T::value);
  return stream;
}
template <typename T>
struct IdentityHelper<Zn<T>> {
  static Zn<T> identity() { return Zn<T>::valueOf(1); }
};
template <int m>
using ZnConst = Zn<std::integral_constant<int, m>>;
template <bool b, typename T = void>
using enable_if_t = typename std::enable_if<b, T>::type;
template <typename T>
class IntegerIterator
    : public std::iterator<std::input_iterator_tag, T, std::ptrdiff_t, T*, T> {
 public:
  explicit IntegerIterator(T value) : value(value) {}
  IntegerIterator& operator++() {
    ++value;
    return *this;
  }
  IntegerIterator operator++(int) {
    IntegerIterator copy = *this;
    ++value;
    return copy;
  }
  IntegerIterator& operator--() {
    --value;
    return *this;
  }
  IntegerIterator operator--(int) {
    IntegerIterator copy = *this;
    --value;
    return copy;
  }
  T operator*() const { return value; }
  bool operator==(IntegerIterator rhs) const { return value == rhs.value; }
  bool operator!=(IntegerIterator rhs) const { return !(*this == rhs); }

 private:
  T value;
};
template <typename T>
class IntegerRange {
 public:
  IntegerRange(T begin, T end) : begin_(begin), end_(end) { ; }
  IntegerIterator<T> begin() const { return IntegerIterator<T>(begin_); }
  IntegerIterator<T> end() const { return IntegerIterator<T>(end_); }

 private:
  T begin_;
  T end_;
};
template <typename T>
class ReversedIntegerRange {
 public:
  ReversedIntegerRange(T begin, T end) : begin_(begin), end_(end) { ; }
  std::reverse_iterator<IntegerIterator<T>> begin() const {
    return std::reverse_iterator<IntegerIterator<T>>(
        IntegerIterator<T>(begin_));
  }
  std::reverse_iterator<IntegerIterator<T>> end() const {
    return std::reverse_iterator<IntegerIterator<T>>(IntegerIterator<T>(end_));
  }

 private:
  T begin_;
  T end_;
};
template <typename T>
IntegerRange<T> range(T to) {
  return IntegerRange<T>(0, to);
}
template <typename T>
IntegerRange<T> range(T from, T to) {
  return IntegerRange<T>(from, to);
}
template <typename T>
IntegerRange<T> inclusiveRange(T to) {
  return IntegerRange<T>(0, to + 1);
}
template <typename T>
IntegerRange<T> inclusiveRange(T from, T to) {
  return IntegerRange<T>(from, to + 1);
}
template <typename T>
ReversedIntegerRange<T> downrange(T from) {
  return ReversedIntegerRange<T>(from, 0);
}
template <typename T>
ReversedIntegerRange<T> downrange(T from, T to) {
  return ReversedIntegerRange<T>(from, to);
}
template <typename T>
ReversedIntegerRange<T> inclusiveDownrange(T from) {
  return ReversedIntegerRange<T>(from + 1, 0);
}
template <typename T>
ReversedIntegerRange<T> inclusiveDownrange(T from, T to) {
  return ReversedIntegerRange<T>(from + 1, to);
}
template <typename T>
T factorial(std::size_t maxN) {
  T result = identity<T>();
  for (std::size_t i = 2; i <= maxN; ++i) {
    result *= static_cast<int64_t>(i);
  }
  return result;
}
template <typename T>
std::vector<T> factorials(std::size_t maxN) {
  std::vector<T> res(maxN + 1);
  res[0] = identity<T>();
  for (std::size_t i = 1; i <= maxN; ++i) {
    res[i] = res[i - 1] * static_cast<long long>(i);
  }
  return res;
}
template <typename T>
std::vector<std::vector<T>> binomials(std::size_t maxN) {
  std::vector<std::vector<T>> res(maxN + 1, std::vector<T>(maxN + 1));
  for (std::size_t n = 0; n <= maxN; ++n) {
    res[n][0] = identity<T>();
    res[n][n] = identity<T>();
    for (std::size_t k = 1; k < n; ++k) {
      res[n][k] = res[n - 1][k - 1] + res[n - 1][k];
    }
  }
  return res;
}
template <typename T, typename U,
          typename = enable_if_t<std::is_integral<U>::value>>
T binomial(U n, U k) {
  if (k > n || k < 0) {
    return T();
  }
  T res = identity<T>();
  for (U i : inclusiveRange<U>(1, k)) {
    res *= n - i + 1;
    res /= i;
  }
  return res;
};
template <typename T, typename U,
          typename = enable_if_t<std::is_integral<U>::value>>
std::vector<T> pascalTriangleRow(U n, U k) {
  ;
  std::vector<T> result(k + 1);
  result[0] = identity<T>();
  for (U i : inclusiveRange<U>(1, k)) {
    result[i] = result[i - 1] * (n - i + 1) / i;
  }
  return result;
};
template <typename T, typename U,
          typename = enable_if_t<std::is_integral<U>::value>>
std::vector<T> pascalTriangleRow(U n) {
  return pascalTriangleRow<T>(n, n);
};
template <typename T, typename U,
          typename = enable_if_t<std::is_integral<U>::value>>
T starsAndBars(U stars, U groups) {
  if (groups == 0) {
    if (stars == 0) {
      return identity<T>();
    } else {
      return T();
    }
  }
  return binomial<T>(stars + groups - 1, groups - 1);
};
template <typename T, size_t N>
struct MakeVector {
  template <typename... Args,
            typename R = std::vector<decltype(MakeVector<T, N - 1>::make_vector(
                std::declval<Args>()...))>>
  static R make_vector(std::size_t first, Args... sizes) {
    auto inner = MakeVector<T, N - 1>::make_vector(sizes...);
    return R(first, inner);
  }
};
template <typename T>
struct MakeVector<T, 1> {
  template <typename R = std::vector<T>>
  static R make_vector(std::size_t size, const T& value) {
    return R(size, value);
  }
};
template <typename T, typename... Args>
auto make_vector(Args... args)
    -> decltype(MakeVector<T, sizeof...(Args) - 1>::make_vector(args...)) {
  return MakeVector<T, sizeof...(Args) - 1>::make_vector(args...);
}
template <typename T>
T binpow(T base, long long power) {
  ;
  T result = identity<T>();
  while (power > 0) {
    if (power & 1) {
      result *= base;
    }
    power >>= 1;
    base *= base;
  }
  return result;
}
using namespace std;
class TaskF {
 public:
  void solve(std::istream& in, std::ostream& out) {
    int N, a, b;
    in >> N >> a >> b;
    using Z = ZnConst<998244353>;
    Z p = Z::valueOf(a) / b;
    auto c = binomials<Z>(N);
    auto biggestComps = make_vector<Z>(N + 1, N + 1, Z());
    biggestComps[1][1] = 1;
    biggestComps[1][0] = 1;
    vector<Z> pwP(N + 1);
    vector<Z> pw1P(N + 1);
    pwP[0] = pw1P[0] = 1;
    for (int i : range(1, N + 1)) {
      pwP[i] = pwP[i - 1] * p;
      pw1P[i] = pw1P[i - 1] * (1 - p);
    }
    for (int n = 1; n < N; ++n) {
      for (int k = 0; k <= n; ++k) {
        biggestComps[n + 1][k + 1] += biggestComps[n][k] * pwP[n - k];
        biggestComps[n + 1][k] += biggestComps[n][k] * pw1P[k];
      }
    }
    vector<Z> prob_full(N + 1);
    for (int n = 1; n <= N; ++n) {
      prob_full[n] = 1;
      for (int k = 1; k < n; ++k) {
        prob_full[n] -= biggestComps[n][k] * prob_full[k];
      }
    }
    vector<Z> ans(N + 1);
    for (int n = 2; n <= N; ++n) {
      Z rhs;
      Z prob_lhs;
      for (int k = 1; k < n; ++k) {
        Z curP = biggestComps[n][k] * prob_full[k];
        rhs += curP * (k * (n - k) + k * (k - 1) / 2 + ans[k] + ans[n - k]);
        prob_lhs += curP;
      }
      rhs += (1 - prob_lhs) * (n * (n - 1) / 2);
      ans[n] = rhs / prob_lhs;
    }
    out << ans[N] << "\n";
  }
};
int main() {
  std::ios_base::sync_with_stdio(false);
  TaskF solver;
  std::istream& in(std::cin);
  std::ostream& out(std::cout);
  in.tie(nullptr);
  out << std::fixed;
  out.precision(20);
  solver.solve(in, out);
  return 0;
}