#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e5 + 10;
int read() {
  int ans = 0;
  bool f = 0;
  char ch = getchar();
  while (ch < '0' or ch > '9') {
    if (ch == '-') f = 1;
    ch = getchar();
  }
  while (ch >= '0' and ch <= '9') {
    ans = (ans << 1) + (ans << 3) + (ch ^ 48);
    ch = getchar();
  }
  return f ? ~ans + 1 : ans;
}
int n, m, x, y, k;
int a[maxn], b[maxn], mmp[maxn];
long long ans;
vector<int> g;
int main() {
  n = read(), m = read(), x = read(), k = read(), y = read();
  for (int i = 1; i <= n; ++i) a[i] = read(), mmp[a[i]] = i;
  for (int i = 1; i <= m; ++i) b[i] = read(), g.push_back(mmp[b[i]]);
  g.push_back(n + 1);
  bool flag = 0;
  for (int i = 2; i <= m; ++i)
    if (mmp[b[i - 1]] > mmp[b[i]]) {
      flag = 1;
      break;
    }
  if (flag) return printf("-1"), 0;
  int last = 0;
  for (int i = 0; i < g.size(); ++i) {
    int now = g[i], maxx = 0, len = now - last - 1;
    for (int j = last + 1; j < now; ++j) maxx = max(maxx, a[j]);
    if (maxx > a[last] and maxx > a[now]) {
      if (len < k) {
        flag = 1;
        break;
      }
      ans += min(1ll * x + 1ll * (len - k) * y,
                 1ll * (len / k) * x + 1ll * (len % k) * y);
      last = now;
      continue;
    }
    ans += min(1ll * len * y, 1ll * (len / k) * x + 1ll * (len % k) * y);
    last = now;
  }
  if (flag) return printf("-1"), 0;
  cout << ans << endl;
  return 0;
}
