#include <bits/stdc++.h>
using namespace std;
using namespace std::chrono;
long long int powD(long long int x, long long int y) {
  long long int res = 1;
  while (y > 0) {
    if (y & 1) res = (res * x) % (long long int)(1e9 + 7);
    x = (x * x) % (long long int)(1e9 + 7);
    y = y >> 1;
  }
  return res;
}
int MAX = 2e5 + 1;
long long int x, k, y;
long long int n, m;
vector<long long int> a(MAX), b(MAX);
long long int calcMinm(int l, int r) {
  long long int maxm = -1;
  if (l != -1) maxm = max(maxm, a[l]);
  if (r != n) maxm = max(maxm, a[r]);
  long long int sz = r - l - 1;
  long long int cnt1 = 0;
  for (int i = l + 1; i < r; ++i) {
    if (a[i] > maxm) cnt1++;
  }
  long long int sum = 0;
  if (sz < k && cnt1) return -1;
  if (x < y * k) {
    return (sz % k) * y + sz / k * x;
  } else {
    if (cnt1) {
      return x + (sz - k) * y;
    } else {
      return sz * y;
    }
  }
}
int main() {
  cin >> n >> m;
  cin >> x >> k >> y;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  for (int i = 0; i < m; ++i) {
    cin >> b[i];
  }
  int j = 0;
  vector<int> idx;
  idx.push_back(-1);
  for (int i = 0; i < n && j < m; i++) {
    if (a[i] == b[j]) {
      idx.push_back(i);
      j++;
    }
  }
  idx.push_back(n);
  if (idx.size() != m + 2) {
    cout << -1 << "\n";
    return 0;
  }
  long long int ans = 0;
  bool flag = 1;
  for (int i = 0; i < m + 1; ++i) {
    long long int qty = calcMinm(idx[i], idx[i + 1]);
    if (qty == -1) {
      flag = 0;
      break;
    }
    ans += calcMinm(idx[i], idx[i + 1]);
  }
  if (flag)
    cout << ans << "\n";
  else
    cout << -1 << "\n";
}
