#include <bits/stdc++.h>   #pragma comment(linker,  /stack:200000000 )   using namespace std;   const double PI = acos(-1.0);   const double eps = 1e-9;   const unsigned long long MOD = 1e9 + 7;   const unsigned long long INF = 1e18 + 7;   const unsigned long long MAXN = 2e5 + 7;   unsigned long long n, m, A, B, C, ans;   unsigned long long d[MAXN], out[MAXN], link[MAXN], pos[MAXN], vi[MAXN];   map<unsigned long long, unsigned long long> mp[MAXN];   unordered_set<unsigned long long> st;   vector<pair<unsigned long long, unsigned long long> > f, G[MAXN];   vector<unsigned long long> l[MAXN], r[MAXN], g[MAXN], low, high;   char vis[MAXN];   signed main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     unsigned long long i, j, k, mid, u, v, w, res;     cin >> n >> m >> A >> B >> C;     for (i = 1; i <= m; i++) {       cin >> u >> v;       d[u]++;       d[v]++;       f.push_back({min(u, v), max(u, v)});     }     sort(f.begin(), f.end(),          [](pair<unsigned long long, unsigned long long> a,             pair<unsigned long long, unsigned long long> b) {            return a.first < b.first ||                   (a.first == b.first && a.second < b.second);          });     for (auto x : f) {       l[x.second].push_back(x.first);       r[x.first].push_back(x.second);     }     res = 0;     for (i = 1; i < n - 1; i++) {       u = (i + 1) * i / 2 - i;       v = (n - 1) * n / 2 - u - i;       res += A * u * (n - 1 - i) + B * i * (i) * (n - 1 - i) + C * v * (i);     }     ans += res;     res = 0;     for (i = 0; i < m; i++) {       pair<unsigned long long, unsigned long long> x = f[i];       u = x.first * (x.first + 1) / 2 - x.first;       res += A * u + B * x.first * (x.first >= 1 ? x.first : 0ull) +              C * x.second * (x.first >= 1 ? x.first : 0ull);       u = (x.first + x.second) * (x.second - x.first + 1) / 2 - x.first -           x.second;       res += A * x.first * (x.second - x.first - 1) + B * u +              C * x.second * (x.second - x.first - 1);       u = (n - 1 + x.second) * (n - 1 - x.second + 1) / 2 - x.second;       res += A * x.first * (n - 1 - x.second) +              B * x.second * (n - 1 - x.second) + C * u;     }     ans -= res;     res = 0;     unsigned long long suml = 0, sumr = 0, cntl = 0, cntr = 0, len;     for (i = 0; i < n; i++) {       suml = sumr = cntl = cntr = 0;       len = l[i].size();       if (len) {         suml = l[i][0];         cntl = 1;         for (j = 1; j < len; j++) {           res += A * suml + B * l[i][j] * cntl + C * i * cntl;           suml += l[i][j];           cntl++;         }       }       len = r[i].size();       if (len) {         sumr = r[i][0];         cntr = 1;         for (j = 1; j < len; j++) {           res += A * i * cntr + B * sumr + C * r[i][j] * cntr;           sumr += r[i][j];           cntr++;         }       }       res += (A * suml * cntr + B * i * cntl * cntr + C * sumr * cntl) *              (cntr > 0 && cntl > 0);     }     ans += res;     res = 0;     for (auto x : f) {       if (d[x.second] < d[x.first])         G[x.second].push_back({x.first, i});       else         G[x.first].push_back({x.second, i});     }     for (i = 0; i < m; i++) {       u = f[i].first;       v = f[i].second;       for (auto vp : G[u]) pos[vp.first] = vp.second, vi[vp.first] = i + 1;       for (auto vp : G[v]) {         w = vp.first;         if (vi[w] == i + 1) {           unsigned long long x, y, z;           x = min(u, min(v, w));           z = max(u, max(v, w));           y = u + v + w - x - z;           res += A * x + B * y + C * z;         }       }     }     ans -= res;     cout << ans << endl;     return 0;   }