#include <bits/stdc++.h>   using namespace std;   const int maxn = 2e5 + 5;   int n, m;   unsigned long long A, B, C;   struct E {     int u, v;     E(int u, int v) : u(u), v(v) {}   };   struct Graph {     int n, m, deg[maxn], cur[maxn];     unsigned long long hash_[maxn];     vector<E> edge;     vector<int> small[maxn], large[maxn];     vector<int> G[maxn];     void init(int n) {       this->n = n, m = 0;       edge.clear();       for (int i = 0; i < n; ++i) {         small[i].clear();         large[i].clear();         G[i].clear();       }     }     void add_edge(int u, int v) {       if (u > v) swap(u, v);       edge.push_back(E(u, v));       G[u].push_back(v);       G[v].push_back(u);       small[v].push_back(u);       large[u].push_back(v);       hash_[m++] = (unsigned long long)u * n + v;     }     unsigned long long sum0() {       unsigned long long s = 0;       for (int i = 0; i < n; ++i) {         s += A * i * ((unsigned long long)(n - 1 - i) * (n - 2 - i) / 2);         s += B * i * i * (n - 1 - i);         s += C * i * ((unsigned long long)i * (i - 1) / 2);       }       return s;     }     unsigned long long sum1() {       unsigned long long s = 0;       for (E e : edge) {         int u = e.u, v = e.v;         s += A * ((unsigned long long)u * (u - 1) / 2) + B * u * u + C * v * u;         s += A * u * (v - u - 1) +              B * ((unsigned long long)(u + v) * (v - u - 1) / 2) +              C * v * (v - u - 1);         s += A * u * (n - 1 - v) + B * v * (n - 1 - v) +              C * ((unsigned long long)(n + v) * (n - 1 - v) / 2);       }       return s;     }     unsigned long long sum2() {       for (int i = 0; i < n; ++i) {         sort(small[i].begin(), small[i].end());         sort(large[i].begin(), large[i].end());       }       unsigned long long s = 0;       for (int i = 0; i < n; ++i) {         unsigned long long scnt = small[i].size();         unsigned long long lcnt = large[i].size();         s += A * i * ((unsigned long long)lcnt * (lcnt - 1) / 2);         for (int j = 0; j < lcnt; ++j)           s += large[i][j] * (B * (lcnt - 1 - j) + C * j);         s += B * i * scnt * lcnt;         for (int j = 0; j < scnt; ++j) s += small[i][j] * A * lcnt;         for (int j = 0; j < lcnt; ++j) s += large[i][j] * C * scnt;         s += C * i * ((unsigned long long)scnt * (scnt - 1) / 2);         for (int j = 0; j < scnt; ++j)           s += small[i][j] * (A * (scnt - 1 - j) + B * j);       }       return s;     }     unsigned long long sum3() {       sort(hash_, hash_ + m);       hash_[m] = -1;       for (int i = 0; i < n; ++i) deg[i] = G[i].size();       unsigned long long s = 0;       for (int i = 0; i < n; ++i) {         int sz = 0;         for (int v : G[i])           if (deg[v] > deg[i] || (deg[v] == deg[i] && v > i)) cur[sz++] = v;         sort(cur, cur + sz);         int l = 0;         for (int j = 0; j < sz; ++j)           for (int k = j + 1; k < sz; ++k) {             int u = cur[j], v = cur[k];             unsigned long long hash = (unsigned long long)u * n + v;             int pos = lower_bound(hash_ + l, hash_ + m, hash) - hash_;             l = pos;             if (hash_[pos] == hash) s += fun(i, u, v);           }       }       return s;     }     unsigned long long sum() { return sum0() - sum1() + sum2() - sum3(); }     unsigned long long fun(int a, int b, int c) {       int mx = max(a, c);       int mn = min(a, b);       return B * (a + b + c) + (A - B) * mn + (C - B) * mx;     }   } graph;   int main(void) {     while (~scanf( %d%d , &n, &m)) {       scanf( %llu%llu%llu , &A, &B, &C);       graph.init(n);       for (int i = 0; i < m; ++i) {         int u, v;         scanf( %d%d , &u, &v);         graph.add_edge(u, v);       }       printf( %llu n , graph.sum());     }     return 0;   }