#include <bits/stdc++.h>
using namespace std;
using LD = long double;
using PLL = pair<long long, long long>;
using VII = vector<pair<int, int> >;
template <class T>
bool power_2(T v) {
  static_assert(std::is_integral<T>::value, "type should be integral");
  return v && !(v & (v - 1));
}
template <class T>
istream& operator>>(istream& st, vector<T>& container) {
  for (auto& u : container) st >> u;
  return st;
}
template <class T>
ostream& operator<<(ostream& st, const vector<T>& container) {
  for (auto& u : container) st << u << ' ';
  return st;
}
template <class T, class U>
istream& operator>>(istream& st, pair<T, U>& p) {
  st >> p.first >> p.second;
  return st;
}
template <class T, class U>
ostream& operator<<(ostream& st, pair<T, U> p) {
  st << p.first << ' ' << p.second;
  return st;
}
template <class T, class U, class V>
pair<T, U> operator*(pair<T, U> p, V val) {
  return {p.first * val, p.second * val};
}
template <class T, class U, class V>
pair<T, U> operator/(pair<T, U> p, V val) {
  return {p.first / val, p.second / val};
}
template <class T, class U>
pair<T, U> operator-(pair<T, U> a, pair<T, U> b) {
  return {a.first - b.first, a.second - b.second};
}
template <class T, class U>
pair<T, U> operator+(pair<T, U> a, pair<T, U> b) {
  return {a.first + b.first, a.second + b.second};
}
template <class T>
T dotProduct(pair<T, T> a, pair<T, T> b) {
  return a.first * b.first + a.second * b.second;
}
template <class T>
T crossProduct(pair<T, T> a, pair<T, T> b) {
  return a.first * b.second - a.second * b.first;
}
template <class T>
T lengthPow(pair<T, T> a) {
  return a.first * a.first + a.second * a.second;
}
template <class T>
LD length(pair<T, T> a) {
  return sqrt(lengthPow(a));
}
const int N = 1e5 + 7, inf = 1e9 + 7;
const long long MOD = 1e9 + 7;
const long long INF = 1e18 + 7;
const long double PI = acos(-1);
const LD EPS = 1e-12;
const int M = 1 << 17;
template <int second>
class MinCost {
 private:
  struct Edge {
    int s;
    int e;
    long long c;
    int f;
  };
  vector<Edge> edges;
  vector<int> g[second];
  long long dist[second];
  int pre[second];
  int m[second];
  void find_paths(int s) {
    fill(begin((dist)), end((dist)), INF);
    fill(begin((pre)), end((pre)), -1);
    fill(begin((m)), end((m)), 2);
    dist[s] = 0;
    pre[s] = -1;
    deque<int> kol;
    kol.push_back(s);
    while (kol.size()) {
      int v = kol.front();
      m[v] = 0;
      kol.pop_front();
      for (auto id : g[v]) {
        auto e = edges[id];
        if (e.f == 0) continue;
        int u = e.e;
        long long newDist = dist[v] + e.c;
        if (newDist < dist[u]) {
          dist[u] = newDist;
          pre[u] = id;
          if (m[u] == 2) {
            m[u] = 1;
            kol.push_back(u);
          } else if (m[u] == 0) {
            m[u] == 1;
            kol.push_front(u);
          }
        }
      }
    }
  }

 public:
  int sink = second - 1;
  int source = second - 2;
  void addEdge(int s, int e, int f, int c) {
    g[s].push_back(edges.size());
    edges.push_back({s, e, c, f});
    g[e].push_back(edges.size());
    edges.push_back({e, s, -c, 0});
  }
  pair<int, long long> getFlow(int k) {
    int flow = 0;
    long long cost = 0;
    while (flow < k) {
      find_paths(source);
      if (dist[sink] == INF) break;
      int u = sink;
      while (u != source) {
        int id = pre[u];
        edges[id].f--;
        edges[id ^ 1].f++;
        u = edges[id].s;
      }
      flow++;
      cost += dist[sink];
    }
    if (flow < k) return {-1, 0};
    return {flow, cost};
  }
};
void solve() {
  int n, m, k, c, d;
  cin >> n >> m >> k >> c >> d;
  MinCost<6000> flow;
  for (int i = 0; i < k; i++) {
    int x;
    cin >> x;
    --x;
    flow.addEdge(flow.source, x, 1, 0);
  }
  int tt = 101;
  for (int i = 0; i < tt; i++) flow.addEdge(0 + i * n, flow.sink, k, i * c);
  for (int i = 0; i < m; i++) {
    int x, y;
    cin >> x >> y;
    --x;
    --y;
    for (int i = 0; i < tt - 1; i++)
      for (int j = 0; j < k; j++)
        flow.addEdge(x + i * n, y + i * n + n, 1, d * (j * 2 + 1));
    for (int i = 0; i < tt - 1; i++)
      for (int j = 0; j < k; j++)
        flow.addEdge(y + i * n, x + i * n + n, 1, d * (j * 2 + 1));
  }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < tt - 1; j++)
      flow.addEdge(i + j * n, i + j * n + n, k, 0);
  auto res = flow.getFlow(k);
  assert(res.first == k);
  cout << res.second << '\n';
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cout << fixed << setprecision(12);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
