The leader of some very secretive organization has decided to invite all other members to a meeting. All members of the organization live in the same town which can be represented as n crossroads connected by m two-directional streets. The meeting will be held in the leader's house near the crossroad 1. There are k members of the organization invited to the meeting; i-th of them lives near the crossroad a_i. 

All members of the organization receive the message about the meeting at the same moment and start moving to the location where the meeting is held. In the beginning of each minute each person is located at some crossroad. He or she can either wait a minute at this crossroad, or spend a minute to walk from the current crossroad along some street to another crossroad (obviously, it is possible to start walking along the street only if it begins or ends at the current crossroad). In the beginning of the first minute each person is at the crossroad where he or she lives. As soon as a person reaches the crossroad number 1, he or she immediately comes to the leader's house and attends the meeting.

Obviously, the leader wants all other members of the organization to come up as early as possible. But, since the organization is very secretive, the leader does not want to attract much attention. Let's denote the discontent of the leader as follows

  * initially the discontent is 0; 
  * whenever a person reaches the crossroad number 1, the discontent of the leader increases by c ⋅ x, where c is some fixed constant, and x is the number of minutes it took the person to reach the crossroad number 1; 
  * whenever x members of the organization walk along the same street at the same moment in the same direction, dx^2 is added to the discontent, where d is some fixed constant. This is not cumulative: for example, if two persons are walking along the same street in the same direction at the same moment, then 4d is added to the discontent, not 5d. 



Before sending a message about the meeting, the leader can tell each member of the organization which path they should choose and where they should wait. Help the leader to establish a plan for every member of the organization so they all reach the crossroad 1, and the discontent is minimized.

Input

The first line of the input contains five integer numbers n, m, k, c and d (2 ≤ n ≤ 50, n - 1 ≤ m ≤ 50, 1 ≤ k, c, d ≤ 50) — the number of crossroads, the number of streets, the number of persons invited to the meeting and the constants affecting the discontent, respectively.

The second line contains k numbers a_1, a_2, ..., a_k (2 ≤ a_i ≤ n) — the crossroads where the members of the organization live.

Then m lines follow, each denoting a bidirectional street. Each line contains two integers x_i and y_i (1 ≤ x_i, y_i ≤ n, x_i ≠ y_i) denoting a street connecting crossroads x_i and y_i. There may be multiple streets connecting the same pair of crossroads.

It is guaranteed that every crossroad can be reached from every other crossroad using the given streets. 

Output

Print one integer: the minimum discontent of the leader after everyone reaches crossroad 1.

Examples

Input


3 2 4 2 3
3 3 3 3
1 2
2 3


Output


52


Input


3 3 4 2 3
3 2 2 3
1 2
2 3
2 3


Output


38

Note

The best course of action in the first test is the following:

  * the first person goes along the street 2 to the crossroad 2, then goes along the street 1 to the crossroad 1 and attends the meeting; 
  * the second person waits one minute on the crossroad 3, then goes along the street 2 to the crossroad 2, then goes along the street 1 to the crossroad 1 and attends the meeting; 
  * the third person waits two minutes on the crossroad 3, then goes along the street 2 to the crossroad 2, then goes along the street 1 to the crossroad 1 and attends the meeting; 
  * the fourth person waits three minutes on the crossroad 3, then goes along the street 2 to the crossroad 2, then goes along the street 1 to the crossroad 1 and attends the meeting. 
#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int maxm = 5e3 + 10;
const int inf = 0x3f3f3f3f;
namespace io {
const int SIZE = (1 << 21) + 1;
char ibuf[SIZE], *iS, *iT, obuf[SIZE], *oS = obuf, *oT = oS + SIZE - 1, c,
                                       qu[55];
int f, qr;
inline void flush() {
  fwrite(obuf, 1, oS - obuf, stdout);
  oS = obuf;
}
inline void putc(char x) {
  *oS++ = x;
  if (oS == oT) flush();
}
template <typename A>
inline bool read(A &x) {
  for (f = 1, c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                              (iS == iT ? EOF : *iS++))
                            : *iS++);
       c < '0' || c > '9';
       c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                       (iS == iT ? EOF : *iS++))
                     : *iS++))
    if (c == '-')
      f = -1;
    else if (c == EOF)
      return 0;
  for (x = 0; c <= '9' && c >= '0';
       c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                       (iS == iT ? EOF : *iS++))
                     : *iS++))
    x = x * 10 + (c & 15);
  x *= f;
  return 1;
}
inline bool read(char &x) {
  while ((x = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                           (iS == iT ? EOF : *iS++))
                        : *iS++)) == ' ' ||
         x == '\n' || x == '\r')
    ;
  return x != EOF;
}
inline bool read(char *x) {
  while ((*x = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                            (iS == iT ? EOF : *iS++))
                         : *iS++)) == '\n' ||
         *x == ' ' || *x == '\r')
    ;
  if (*x == EOF) return 0;
  while (!(*x == '\n' || *x == ' ' || *x == '\r' || *x == EOF))
    *(++x) = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                          (iS == iT ? EOF : *iS++))
                       : *iS++);
  *x = 0;
  return 1;
}
template <typename A, typename... B>
inline bool read(A &x, B &...y) {
  return read(x) && read(y...);
}
template <typename A>
inline bool write(A x) {
  if (!x) putc('0');
  if (x < 0) putc('-'), x = -x;
  while (x) qu[++qr] = x % 10 + '0', x /= 10;
  while (qr) putc(qu[qr--]);
  return 0;
}
inline bool write(char x) {
  putc(x);
  return 0;
}
inline bool write(const char *x) {
  while (*x) {
    putc(*x);
    ++x;
  }
  return 0;
}
inline bool write(char *x) {
  while (*x) {
    putc(*x);
    ++x;
  }
  return 0;
}
template <typename A, typename... B>
inline bool write(A x, B... y) {
  return write(x) || write(y...);
}
struct Flusher_ {
  ~Flusher_() { flush(); }
} io_flusher_;
}  // namespace io
using io ::putc;
using io ::read;
using io ::write;
vector<int> eee[maxm];
int s, t, dis[maxm], h[maxm], fnasiofnoas[maxm], pree[maxm], num[maxm];
struct edge {
  int u, v, c, w, rev;
  edge(int a = -1, int b = 0, int cc = 0, int d = 0, int f = 0)
      : rev(a), u(b), v(cc), c(d), w(f) {}
};
vector<edge> ed[maxm];
void addedge(int u, int v, int c, int w) {
  ed[u].push_back(edge((int)ed[v].size(), u, v, c, w));
  ed[v].push_back(edge((int)ed[u].size() - 1, v, u, 0, -w));
}
struct node {
  int id, val;
  node(int a = 0, int b = 0) : id(a), val(b) {}
  friend bool operator<(node e1, node e2) { return e1.val > e2.val; }
};
priority_queue<node> pq;
int costflow() {
  int res = 0;
  memset(h, 0, sizeof(h));
  int tot = inf;
  while (tot > 0) {
    memset(dis, 0x3f, sizeof(dis));
    while (!pq.empty()) pq.pop();
    dis[s] = 0;
    pq.push(node(s, 0));
    while (!pq.empty()) {
      node now = pq.top();
      pq.pop();
      int u = now.id;
      if (dis[u] < now.val) continue;
      int len = (int)ed[u].size();
      for (int i = 0; i < len; i++) {
        int v = ed[u][i].v;
        int f = ed[u][i].c;
        int w = ed[u][i].w;
        if (ed[u][i].c && dis[v] > dis[u] + w + h[u] - h[v]) {
          dis[v] = dis[u] + w + h[u] - h[v];
          fnasiofnoas[v] = u;
          pree[v] = i;
          pq.push(node(v, dis[v]));
        }
      }
    }
    if (dis[t] == inf) break;
    for (int i = 0; i <= t; i++) h[i] += dis[i];
    int flow = inf;
    for (int i = t; i; i = fnasiofnoas[i])
      flow = min(flow, ed[fnasiofnoas[i]][pree[i]].c);
    tot -= flow;
    res += flow * h[t];
    for (int i = t; i; i = fnasiofnoas[i]) {
      edge &e = ed[fnasiofnoas[i]][pree[i]];
      e.c -= flow;
      ed[e.v][e.rev].c += flow;
    }
  }
  return res;
}
int main() {
  int n, m, k, c, d;
  read(n, m, k, c, d);
  for (int i = 1; i <= k; i++) {
    int x;
    read(x);
    num[x]++;
  }
  for (int i = 1; i <= m; i++) {
    int u, v;
    read(u, v);
    eee[u].push_back(v);
    eee[v].push_back(u);
  }
  s = 0, t = n * 100 + 1;
  for (int i = 1; i <= n; i++) addedge(s, i, num[i], 0);
  for (int i = 1; i <= 99; i++) {
    int N = (i - 1) * n;
    for (int j = 1; j <= n; j++) {
      for (int v : eee[j]) {
        for (int z = 1; z <= k; z++) {
          addedge(j + N, v + N + n, 1, (2 * z - 1) * d + c);
        }
      }
      addedge(j + N, j + N + n, inf, c);
    }
    addedge(N + 1, t, inf, 0);
  }
  addedge(99 * n + 1, t, inf, 0);
  printf("%d\n", costflow());
  return 0;
}
