#include <bits/stdc++.h>
using namespace std;
void Main();
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  while (~cin.peek()) Main(), cin.get();
  return 0;
}
template <typename T1, typename T2, typename T3>
struct _three_element_struct {
  T1 &first;
  T2 &second;
  T3 &third;
  _three_element_struct(T1 &first, T2 &second, T3 &third)
      : first(first), second(second), third(third) {}
};
template <typename T1, typename T2, typename T3>
_three_element_struct<T1, T2, T3> gettuple(tuple<T1, T2, T3> &a) {
  return _three_element_struct<T1, T2, T3>(get<0>(a), get<1>(a), get<2>(a));
}
template <typename T1, typename T2, typename T3, typename T4>
struct _four_element_struct {
  T1 &first;
  T2 &second;
  T3 &third;
  T4 &fourth;
  _four_element_struct(T1 &first, T2 &second, T3 &third, T4 &fourth)
      : first(first), second(second), third(third), fourth(fourth) {}
};
template <typename T1, typename T2, typename T3, typename T4>
_four_element_struct<T1, T2, T3, T4> gettuple(tuple<T1, T2, T3, T4> &a) {
  return _four_element_struct<T1, T2, T3, T4>(get<0>(a), get<1>(a), get<2>(a),
                                              get<3>(a));
}
struct tiii : tuple<int, int, int> {
  using tuple<int, int, int>::tuple;
  int &operator[](int x) {
    if (x == 0) return get<0>(*this);
    if (x == 1) return get<1>(*this);
    if (x == 2) return get<2>(*this);
    assert(0);
  }
};
template <typename T>
bool updmin(T &a, T b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
void Main() {
  int n, m, k, c, d;
  cin >> n >> m >> k >> c >> d;
  vector<int> a(k);
  for (int i = 0; i < k; i++) {
    cin >> a[i];
    a[i]--;
  }
  vector<vector<int>> g(n);
  for (int i = 0; i < m; i++) {
    int u, v;
    cin >> u >> v;
    u--, v--;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  int maxt = n - 1 + k - 1;
  int s = (maxt + 1) * n, t = s + 1;
  vector<tiii> edges;
  vector<vector<int>> graph(t + 1);
  auto add_edge = [&](int u, int v, int w, int c) {
    edges.push_back(tiii{v, w, c});
    edges.push_back(tiii{u, 0, -c});
    graph[u].push_back(edges.size() - 2);
    graph[v].push_back(edges.size() - 1);
  };
  for (int i = 0; i < k; i++) {
    add_edge(s, a[i], 1, 0);
  }
  for (int time = 0; time <= maxt; time++) {
    if (time < maxt) {
      for (int i = 0; i < n; i++) {
        for (int &v : g[i]) {
          for (int j = 0; j < k; j++) {
            add_edge(time * n + i, time * n + n + v, 1, (2 * j + 1) * d);
          }
        }
        add_edge(time * n + i, time * n + n + i, 1000000, 0);
      }
    }
    add_edge(time * n, t, 100000, time * c);
  }
  auto expand = [&](int s, int t) {
    queue<int> q;
    q.push(s);
    vector<pair<int, int>> dist(graph.size(), {1e9, 0});
    dist[s] = {0, -1};
    vector<int> vis(graph.size());
    while (!q.empty()) {
      int u = q.front();
      q.pop();
      vis[u] = 0;
      for (int &e : graph[u]) {
        if (edges[e][1] > 0 &&
            dist[edges[e][0]].first > dist[u].first + edges[e][2]) {
          dist[edges[e][0]] = {dist[u].first + edges[e][2], e};
          if (!vis[edges[e][0]]) q.push(edges[e][0]), vis[edges[e][0]] = 1;
        }
      }
    }
    if (dist[t].first > 1e8) return make_pair(0, 0);
    for (int i = t; i != s;) {
      edges[dist[i].second][1]--;
      edges[dist[i].second ^ 1][1]++;
      i = edges[dist[i].second ^ 1][0];
    }
    return make_pair(1, dist[t].first);
  };
  long long ans = 0;
  while (1) {
    auto r = expand(s, t);
    if (r.first)
      ans += r.second;
    else
      break;
  }
  cout << ans << endl;
}
