#include <bits/stdc++.h>
using namespace std;
const int N = 400010;
int n, m, tot, h[N], e[N], nxt[N], vis[N], H[N], E[N], Nxt[N], de[N], a[N],
    b[3];
unsigned long long A, B, C, s1[N], s2[N], ans;
void Add(int x, int y) {
  e[++tot] = y;
  nxt[tot] = h[x];
  h[x] = tot;
  de[x]++;
}
void Addd(int x, int y) {
  E[++tot] = y;
  Nxt[tot] = H[x];
  H[x] = tot;
}
int main() {
  scanf("%d%d%I64u%I64u%I64u", &n, &m, &A, &B, &C);
  for (int x, y; m--;) {
    scanf("%d%d", &x, &y);
    Add(x, y);
    Add(y, x);
  }
  tot = 0;
  for (int i = 0; i < n; i++)
    for (int j = h[i]; j; j = nxt[j])
      if (de[e[j]] > de[i] || de[e[j]] == de[i] && e[j] > i) Addd(i, e[j]);
  for (int i = 0; i < n; i++) {
    ans += s2[i - 1] + (unsigned long long)(i - 1) * i / 2 * C * i;
    s2[i] = s2[i - 1] + s1[i - 1] + i * B * i;
    s1[i] = s1[i - 1] + A * i;
  }
  memset(vis, 255, sizeof(vis));
  for (int i = 0; i < n; i++) {
    m = 0;
    for (int j = h[i]; j; j = nxt[j]) {
      a[++m] = e[j];
      vis[e[j]] = i;
    }
    for (int j = H[i]; j; j = Nxt[j])
      for (int k = H[E[j]]; k; k = Nxt[k])
        if (vis[E[k]] == i) {
          b[0] = i;
          b[1] = E[j];
          b[2] = E[k];
          sort(b, b + 3);
          ans -= A * b[0] + B * b[1] + C * b[2];
        }
    sort(a + 1, a + m + 1);
    for (int j = 1; j <= m && a[j] < i; j++) {
      ans -= (a[j] * A + i * B) * (n - 1 - i) +
             (unsigned long long)(i + n) * (n - 1 - i) / 2 * C +
             (a[j] * A + i * C) * (i - a[j] - 1) +
             (unsigned long long)(a[j] + i) * (i - a[j] - 1) / 2 * B +
             (a[j] * B + i * C) * a[j] +
             (unsigned long long)(a[j] - 1) * a[j] / 2 * A;
      s1[j] = s1[j - 1] + A * a[j];
      ans += s1[j - 1] + (j - 1) * (a[j] * B + i * C);
    }
    s1[m + 1] = 0;
    for (int j = m; j && a[j] > i; j--) {
      s1[j] = s1[j + 1] + C * a[j];
      ans += s1[j + 1] + (m - j) * (a[j] * B + i * A);
    }
    for (int j = 1; j < m; j++)
      if (a[j] < i && a[j + 1] > i)
        ans += s1[j] * (m - j) + s1[j + 1] * j + B * i * j * (m - j);
  }
  printf("%I64u\n", ans);
  return 0;
}
