Problem: There are n players numbered from 0 to n-1 with ranks. The i-th player has rank i.

Players can form teams: the team should consist of three players and no pair of players in the team should have a conflict. The rank of the team is calculated using the following algorithm: let i, j, k be the ranks of players in the team and i < j < k, then the rank of the team is equal to A ⋅ i + B ⋅ j + C ⋅ k.

You are given information about the pairs of players who have a conflict. Calculate the total sum of ranks over all possible valid teams modulo 2^{64}.

Input

The first line contains two space-separated integers n and m (3 ≤ n ≤ 2 ⋅ 10^5, 0 ≤ m ≤ 2 ⋅ 10^5) — the number of players and the number of conflicting pairs.

The second line contains three space-separated integers A, B and C (1 ≤ A, B, C ≤ 10^6) — coefficients for team rank calculation.

Each of the next m lines contains two space-separated integers u_i and v_i (0 ≤ u_i, v_i < n, u_i ≠ v_i) — pair of conflicting players.

It's guaranteed that each unordered pair of players appears in the input file no more than once.

Output

Print single integer — the total sum of ranks over all possible teams modulo 2^{64}.

Examples

Input

4 0
2 3 4


Output

64


Input

4 1
2 3 4
1 0


Output

38


Input

6 4
1 5 3
0 3
3 5
5 4
4 3


Output

164

Note

In the first example all 4 teams are valid, i.e. triples: {0, 1, 2}, {0, 1, 3}, {0, 2, 3} {1, 2, 3}.

In the second example teams are following: {0, 2, 3}, {1, 2, 3}.

In the third example teams are following: {0, 1, 2}, {0, 1, 4}, {0, 1, 5}, {0, 2, 4}, {0, 2, 5}, {1, 2, 3}, {1, 2, 4}, {1, 2, 5}.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
template <typename T>
T gcd(T m, T n) {
  while (n) {
    T t = m % n;
    m = n;
    n = t;
  };
  return m;
}
template <typename T>
T exgcd(T a, T b, T& sa, T& ta) {
  T q, r, sb = 0, tb = 1, sc, tc;
  sa = 1, ta = 0;
  if (b) do
      q = a / b, r = a - q * b, a = b, b = r, sc = sa - q * sb, sa = sb,
      sb = sc, tc = ta - q * tb, ta = tb, tb = tc;
    while (b);
  return a;
}
template <typename T>
T mul_inv(T a, T b) {
  T t1 = a, t2 = b, t3;
  T v1 = 1, v2 = 0, v3;
  T x;
  while (t2 != 1)
    x = t1 / t2, t3 = t1 - x * t2, v3 = v1 - x * v2, t1 = t2, t2 = t3, v1 = v2,
    v2 = v3;
  return (v2 + b) % b;
}
template <typename T>
T powmod(T a, T b, T MOD) {
  if (b < 0) return 0;
  T rv = 1;
  while (b) (b % 2) && (rv = (rv * a) % MOD), a = a * a % MOD, b /= 2;
  return rv;
}
const int maxn = 2e5 + 7;
const int max_sqrt_n = 480;
const int maxm = 2e5 + 7;
int n, m;
unsigned long long A, B, C;
unsigned long long sum_matching_left_by_idx[maxn + 7];
unsigned long long nbr_matching_left_by_idx[maxn + 7];
unsigned long long sum_matching_right_by_idx[maxn + 7];
unsigned long long nbr_matching_right_by_idx[maxn + 7];
vector<int> adj[maxn + 7];
vector<int> nadj[maxn + 7];
pair<int, int> v_orders[maxn + 7];
unsigned long long v_sum[maxn + 7];
unsigned long long v_idx[maxn + 7];
bool is_mx_adj[max_sqrt_n * 2][max_sqrt_n * 2];
set<pair<int, int> > s;
int main(int argc, char* argv[]) {
  std::cin.sync_with_stdio(false);
  std::cin.tie(nullptr);
  cin >> n >> m >> A >> B >> C;
  {
    memset(sum_matching_left_by_idx, 0, sizeof(sum_matching_left_by_idx));
    memset(nbr_matching_left_by_idx, 0, sizeof(nbr_matching_left_by_idx));
    memset(sum_matching_right_by_idx, 0, sizeof(sum_matching_right_by_idx));
    memset(nbr_matching_right_by_idx, 0, sizeof(nbr_matching_right_by_idx));
    for (int i = 0; i < m; i++) {
      int u, v;
      cin >> u >> v;
      adj[u].push_back(v);
      adj[v].push_back(u);
      nadj[min(u, v)].push_back(max(u, v));
      s.insert(make_pair(min(u, v), max(u, v)));
    }
    unsigned long long mx = (unsigned long long)n * (n - 1) / 2;
    unsigned long long r = 0;
    unsigned long long sum_matching_left = 0;
    unsigned long long sum_matching_right = 0;
    unsigned long long n_matching = 0;
    unsigned long long left_sum_left = 0;
    unsigned long long left_sum_nbr = 0;
    unsigned long long left_sum_right = 0;
    for (int i = 1, ie = n - 1; i < ie; i++) {
      for (int v : adj[i]) {
        if (v < i - 1) {
          sum_matching_left -= v;
          sum_matching_right -= i;
          n_matching--;
          sum_matching_left_by_idx[v] -= i;
          nbr_matching_left_by_idx[v]--;
          sum_matching_right_by_idx[i] -= v;
          nbr_matching_right_by_idx[i]--;
          left_sum_left -= v;
          left_sum_right -= i;
          left_sum_nbr--;
        }
      };
      for (int v : adj[i - 1]) {
        if (v > i) {
          sum_matching_left += i - 1;
          sum_matching_right += v;
          n_matching++;
          sum_matching_left_by_idx[i - 1] += v;
          nbr_matching_left_by_idx[i - 1]++;
          sum_matching_right_by_idx[v] += i - 1;
          nbr_matching_right_by_idx[v]++;
          left_sum_left += i - 1;
          left_sum_right += v;
          left_sum_nbr++;
        }
      };
      unsigned long long sum_left = (unsigned long long)i * (i - 1) / 2;
      unsigned long long sum_right = mx - (unsigned long long)i * (i + 1) / 2;
      int n_left = i, n_right = n - i - 1;
      r -= A * left_sum_left + B * i * left_sum_nbr + C * left_sum_right;
      for (int v : adj[i]) {
        if (v < i) {
          sum_left -= v, n_left--;
          r += A * v * nbr_matching_left_by_idx[v] +
               B * i * nbr_matching_left_by_idx[v] +
               C * sum_matching_left_by_idx[v];
        } else {
          sum_right -= v, n_right--;
          r += A * sum_matching_right_by_idx[v] +
               B * i * nbr_matching_right_by_idx[v] +
               C * v * nbr_matching_right_by_idx[v];
        }
      }
      if (n_left > 0 && n_right > 0) {
        r += A * sum_left * n_right + B * i * n_left * n_right +
             sum_right * C * n_left;
      }
    }
    for (int i = 0; i < n; i++) {
      v_orders[i] = make_pair(adj[i].size(), i);
    }
    sort(v_orders, v_orders + n, greater<pair<int, int> >());
    v_sum[0] = v_orders[0].first;
    for (int i = 1; i < n; i++) v_sum[i] = v_sum[i - 1] + v_orders[i].first;
    for (int i = 0; i < n; i++) v_idx[v_orders[i].second] = i;
    int max_set_idx = min(n - 1, (int)(((int)sqrt(n)) * 1.7));
    memset(is_mx_adj, 0, sizeof(is_mx_adj));
    for (int i = 0; i <= max_set_idx; i++) {
      int mi = v_orders[i].second;
      for (int j = i + 1; j <= max_set_idx; j++) {
        int mj = v_orders[j].second;
        is_mx_adj[i][j] = is_mx_adj[j][i] =
            (s.find(make_pair(min(mi, mj), max(mi, mj))) != s.end());
      }
    }
    for (int i = 0; i <= max_set_idx; i++) {
      int mi = v_orders[i].second;
      for (int j = i + 1; j <= max_set_idx; j++) {
        if (is_mx_adj[i][j]) {
          int mj = v_orders[j].second;
          for (int k = j + 1; k <= max_set_idx; k++) {
            int mk = v_orders[k].second;
            if (is_mx_adj[j][k] && is_mx_adj[i][k]) {
              int xi = min(mi, min(mj, mk));
              int xk = max(mi, max(mj, mk));
              int xj = mi + mj + mk - xi - xk;
              r -= A * xi + B * xj + C * xk;
            }
          }
        }
      }
    }
    for (int ii = max_set_idx + 1; ii < n; ii++) {
      int i = v_orders[ii].second;
      for (int j : adj[i]) {
        int j_small = v_idx[j] >= max_set_idx + 1;
        for (int k : adj[i]) {
          int k_small = v_idx[k] >= max_set_idx + 1;
          if ((s.find(make_pair(j, k)) != s.end())) {
            if ((j_small + k_small == 0 && j < k) ||
                (j_small + k_small == 1 && i < (j_small ? j : k)) ||
                (j_small + k_small == 2 && i < j && j < k)) {
              int mi = min(j, i);
              int mk = max(i, k);
              int mj = i + j + k - mi - mk;
              r -= A * mi + B * mj + C * mk;
            }
          }
        }
      }
    }
    cout << r << endl;
  }
  return 0;
}