#include <bits/stdc++.h>   using namespace std;   const unsigned long long maxn = 200005;   unsigned long long n, m, vis[maxn];   unsigned long long sum, A, B, C, he[maxn];   struct node {     unsigned long long x, y;     bool operator<(const node &a) const { return x == a.x ? x < a.x : y < a.y; }   } chongtu[maxn];   vector<unsigned long long> to[maxn], from[maxn];   vector<unsigned long long> toq[maxn], fromq[maxn];   map<pair<unsigned long long, unsigned long long>, unsigned long long> mp;   inline unsigned long long read() {     unsigned long long x = 0, f = 1;     char ch = getchar();     while (ch <  0  || ch >  9 ) {       if (ch ==  - ) f = -1;       ch = getchar();     }     while (ch >=  0  && ch <=  9 ) {       x = (x << 1) + (x << 3) + (ch ^ 48);       ch = getchar();     }     return x * f;   }   inline void write(unsigned long long a) {     if (a < 0) {       putchar( - );       putchar( 1 );     } else {       if (a >= 10) write(a / 10);       putchar(a % 10 +  0 );     }   }   signed main() {     n = read(), m = read();     A = read(), B = read(), C = read();     for (unsigned long long i = 0; i <= n - 3; ++i) {       unsigned long long len = (n - 1) - (i + 1) + 1;       sum += 1ull * len * (len - 1) / 2 * A * i;     }     for (unsigned long long j = 1; j <= n - 2; ++j) {       unsigned long long len1 = (j - 1) - 0 + 1, len2 = (n - 1) - (j + 1) + 1;       sum += 1ull * len1 * len2 * B * j;     }     for (unsigned long long k = 2; k <= n - 1; ++k) {       unsigned long long len = (k - 1) - 0 + 1;       sum += 1ull * len * (len - 1) / 2 * C * k;     }     for (unsigned long long i = 1; i < n; ++i) he[i] = he[i - 1] + i;     for (unsigned long long i = 1; i <= m; ++i) {       unsigned long long x = read(), y = read();       if (x > y) swap(x, y);       chongtu[i].x = x, chongtu[i].y = y;     }     sort(chongtu + 1, chongtu + m + 1);     for (unsigned long long i = 1; i <= m; ++i) {       unsigned long long x = chongtu[i].x, y = chongtu[i].y;       mp[make_pair(x, y)]++;       to[x].push_back(y);       toq[x].push_back(1);       from[y].push_back(x);       fromq[y].push_back(1);       if (x >= 1)         sum -= 1ull * ((x - 1) - 0 + 1) * (B * x + C * y) +                1ull * A * (he[x - 1] - he[0]);       if (y - x >= 2)         sum -= 1ull * ((y - 1) - (x + 1) + 1) * (A * x + C * y) +                1ull * B * (he[y - 1] - he[x]);       if (y <= n - 2)         sum -= 1ull * ((n - 1) - (y + 1) + 1) * (A * x + B * y) +                1ull * C * (he[n - 1] - he[y]);     }     for (unsigned long long i = 0; i < n; ++i) {       sort(to[i].begin(), to[i].end());       sort(from[i].begin(), from[i].end());     }     for (unsigned long long fu = 0; fu < n; ++fu) {       unsigned long long size11 = to[fu].size();       for (unsigned long long k = 0; k < size11; ++k) {         unsigned long long zi = to[fu][k];         toq[fu][k] = zi;         if (k) toq[fu][k] += toq[fu][k - 1];       }     }     for (unsigned long long zi = 0; zi < n; ++zi) {       unsigned long long size11 = from[zi].size();       for (unsigned long long k = 0; k < size11; ++k) {         unsigned long long fu = from[zi][k];         fromq[zi][k] = fu;         if (k) fromq[zi][k] += fromq[zi][k - 1];       }     }     for (unsigned long long fu = 0; fu < n; ++fu) {       unsigned long long size = to[fu].size();       sum += 1ull * (size - 1) * (size) / 2 * A * fu;       for (unsigned long long j = 0; j < size; ++j) {         unsigned long long zi1 = to[fu][j];         sum += 1ull * B * ((size - 1) - (j + 1) + 1) * zi1;         sum += 1ull * C * (toq[fu][size - 1] - toq[fu][j]);       }     }     for (unsigned long long zi = 0; zi < n; ++zi) {       unsigned long long size = from[zi].size();       sum += 1ull * (size - 1) * (size) / 2 * C * zi;       for (unsigned long long j = 0; j < size; ++j) {         unsigned long long fu1 = from[zi][j];         sum += 1ull * A * ((size - 1) - (j + 1) + 1) * fu1;         sum += 1ull * B * (fromq[zi][size - 1] - fromq[zi][j]);       }     }     for (unsigned long long zi = 0; zi < n; ++zi) {       unsigned long long size1 = to[zi].size(), size2 = from[zi].size();       sum += 1ull * B * (size1) * (size2)*zi;       for (unsigned long long j = 0; j < size1; ++j) {         unsigned long long sun = to[zi][j];         sum += 1ull * C * sun * size2;         if (size2) sum += 1ull * A * fromq[zi][size2 - 1];         for (unsigned long long k = 0; k < size2; ++k) {           unsigned long long fu = from[zi][k];         }       }     }     for (unsigned long long fu = 0; fu < n; ++fu) {       unsigned long long size = to[fu].size();       for (unsigned long long j = 0; j < size; ++j) vis[to[fu][j]] = 1;       for (unsigned long long j = 0; j < size; ++j) {         unsigned long long zi = to[fu][j];         unsigned long long sizez = to[zi].size();         for (unsigned long long k = 0; k < sizez; ++k) {           unsigned long long sun = to[zi][k];           if (vis[sun]) sum -= (1ull * A * fu + 1ull * B * zi + 1ull * C * sun);         }       }       for (unsigned long long j = 0; j < size; ++j) vis[to[fu][j]] = 0;     }     cout << sum;     return 0;   }