#include <bits/stdc++.h>
#pragma GCC optimize("-O3")
using namespace std;
const long long mod = 998244353;
int n, m, k, c, dv, u, v, a;
struct edge {
  int u, v, cost, cap, ind;
  edge() {}
  edge(int _u, int _v, int _c, int _cap, int _ind)
      : u(_u), v(_v), cost(_c), cap(_cap), ind(_ind) {}
  int get(int t) { return t ^ u ^ v; }
};
const int inf = 1e9;
template <class edge, int inf>
class edkarp {
 public:
  vector<edge> edges;
  vector<vector<int>> adj;
  int n;
  void init(int _n) {
    n = _n;
    adj.assign(n, vector<int>(0));
  }
  inline int comp(int i) { return i ^ 1; }
  inline int par(int i, int edge_num) { return edges[edge_num].get(i); }
  void add(int u, int v, int co, int capac, int indic) {
    adj[u].emplace_back(edges.size());
    edges.emplace_back(u, v, co, capac, indic);
    adj[v].emplace_back(edges.size());
    edges.emplace_back(v, u, -co, 0, indic);
  }
  void shortest_path(int v, vector<int> &d, vector<int> &p) {
    p.assign(n, -1);
    d.assign(n, inf);
    vector<bool> inq(n, false);
    d[v] = 0;
    queue<int> q;
    q.push(v);
    inq[v] = true;
    while (!q.empty()) {
      int i = q.front();
      q.pop();
      inq[i] = false;
      for (auto &x : adj[i]) {
        int u = par(i, x);
        if (edges[x].cap && d[u] > d[i] + edges[x].cost) {
          d[u] = d[i] + edges[x].cost;
          p[u] = x;
          if (!inq[u]) {
            q.push(u);
            inq[u] = true;
          }
        }
      }
    }
  }
  int mincost(int st, int tar, int k = inf) {
    vector<int> p, d;
    int flow = 0, cost = 0;
    int nf;
    while (flow < k) {
      shortest_path(st, d, p);
      if (d[tar] == inf) break;
      nf = 1;
      flow += nf;
      cost += nf * d[tar];
      int cr = tar;
      while (cr != st) {
        edges[p[cr]].cap -= nf;
        edges[comp(p[cr])].cap += nf;
        if (edges[p[cr]].ind) {
          if (p[cr] % 2) {
            edges[comp(p[cr])].cost -= 2 * dv;
            edges[p[cr]].cost += 2 * dv;
          } else {
            edges[comp(p[cr])].cost = -edges[p[cr]].cost;
            edges[p[cr]].cost += 2 * dv;
          }
        }
        cr = par(cr, p[cr]);
      }
    }
    return cost;
  }
};
int cnt[53];
edkarp<edge, inf> fo;
inline int lvl(int j, int lv) { return lv * n + j; }
void solve() {
  cin >> n >> m >> k >> c >> dv;
  fill(cnt, cnt + n + 1, 0);
  fo.init(n * 100 + 2);
  for (int i = 0; i < k; i++) {
    cin >> a;
    cnt[a]++;
  }
  int st = 100 * n;
  int tar = st + 1;
  for (int i = 2; i <= n; i++) {
    if (cnt[a] > 0) fo.add(st, i - 1, 0, cnt[i], 0);
  }
  for (int i = 0; i < m; i++) {
    cin >> u >> v;
    u--, v--;
    for (int j = 0; j < 99; j++) {
      fo.add(lvl(u, j), lvl(v, j + 1), dv, k, 1);
      fo.add(lvl(v, j), lvl(u, j + 1), dv, k, 1);
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < 99; j++) {
      fo.add(lvl(i, j), lvl(i, j + 1), 0, k, 0);
    }
  }
  for (int j = 1; j < 100; j++) {
    fo.add(lvl(0, j), tar, c * j, k, 0);
  }
  int mn = fo.mincost(st, tar, k);
  cout << mn << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
}
