#include <bits/stdc++.h>   using namespace std;   const int N = 200005;   bitset<N> vis;   int n, m, d[N], bound;   vector<int> g[N];   set<int> h[N];   unsigned long long a, b, c, ans, sum[N];   inline unsigned long long get(int u, int v) {     if (u > v) swap(u, v);     unsigned long long x = a * u * 1LLU * (u - 1) / 2 + u * (b * u + c * v);     unsigned long long y = b * (v * 1LLU * (v - 1) - u * 1LLU * (u + 1)) / 2 +                            (v - u - 1) * (a * u + c * v);     unsigned long long z = c * (n * 1LLU * (n - 1) - v * 1LLU * (v + 1)) / 2 +                            (n - v - 1) * (a * u + b * v);     return x + y + z;   }   inline unsigned long long val(int u, int v, int w) {     int x[3] = {u, v, w};     sort(x, x + 3);     return a * x[0] + b * x[1] + c * x[2];   }   vector<pair<int, int> > edges;   bitset<N> isHeavy;   vector<int> heavy;   inline bool isEdge(int u, int v) { return h[u].find(v) != h[u].end(); }   void triangles() {     for (int i = 0; i < n; ++i) {       if (d[i] > bound) {         heavy.push_back(i);         isHeavy[i] = 1;       }     }     for (int u : heavy) {       for (pair<int, int> e : edges) {         int v = e.first, w = e.second;         if (isHeavy[v] and v < u) continue;         if (isHeavy[w] and w < u) continue;         if (isEdge(u, v) and isEdge(u, w)) {           ans -= val(u, v, w);         }       }     }     for (pair<int, int> e : edges) {       int u = e.first, v = e.second;       if (u > v) swap(u, v);       if (isHeavy[u] or isHeavy[v]) continue;       for (int i = 0, j = 0; i < g[u].size() and j < g[v].size();) {         if (g[u][i] == g[v][j]) {           int w = g[u][i];           if (!isHeavy[w] and w > v) {             ans -= val(u, v, w);           }           ++i;         } else if (g[u][i] < g[v][j]) {           ++i;         } else {           ++j;         }       }     }   }   int main() {     scanf( %d %d %llu %llu %llu , &n, &m, &a, &b, &c);     bound = 700;     for (unsigned long long k = 0; k < n; ++k) {       unsigned long long x = k * (k - 1) / 2;       unsigned long long y = k * (a + 2 * b + 3 * c) - (2 * a + b);       if (x % 3 == 0)         x /= 3;       else         y /= 3;       ans += x * y;     }     while (m--) {       int u, v;       scanf( %d %d , &u, &v);       ++d[u], ++d[v];       edges.emplace_back(u, v);       ans -= get(u, v);       g[u].push_back(v);       g[v].push_back(u);       h[u].insert(v);       h[v].insert(u);     }     for (int i = 0; i < n; ++i) {       sort(g[i].begin(), g[i].end());       int sz = g[i].size();       for (int j = 0; j < sz; ++j) {         sum[j + 1] = sum[j] + g[i][j];       }       int at = 0;       while (at < sz and g[i][at] < i) {         ++at;       }       for (int j = 0; j < sz; ++j) {         unsigned long long cur;         int u = g[i][j];         if (u > i) {           cur = (sz - 1 - j) * (a * i + b * u) + c * (sum[sz] - sum[j + 1]);           ans += cur;         }         if (u < i) {           cur = (sz - at) * (a * u + b * i) + c * (sum[sz] - sum[at]);           ans += cur;           cur = j * (b * u + c * i) + a * sum[j];           ans += cur;         }       }     }     triangles();     printf( %llu n , ans);     return 0;   }