#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long T = 1;
  while (T--) {
    long long n, m, x, k, y;
    cin >> n >> m >> x >> k >> y;
    vector<long long> a(n + 2, 0), b(m + 2, 0);
    for (long long i = 1; i <= n; i++) cin >> a[i];
    for (long long i = 1; i <= m; i++) cin >> b[i];
    long long j = 1;
    vector<long long> v;
    v.push_back(0);
    for (long long i = 1; i <= n; i++) {
      if (a[i] == b[j]) {
        v.push_back(i);
        j++;
      }
    }
    v.push_back(n + 1);
    if (j != m + 1) {
      cout << "-1\n";
      return 0;
    }
    long long ans = 0;
    for (long long i = 1; i < (long long)v.size(); i++) {
      long long l = v[i - 1], r = v[i];
      long long mx = max(a[l], a[r]);
      vector<long long> temp;
      for (long long j = l + 1; j < r; j++) temp.push_back(a[j]);
      sort(temp.begin(), temp.end());
      long long sz = temp.size();
      if (sz > 0 && sz < k && temp[sz - 1] > mx) {
        cout << "-1\n";
        return 0;
      }
      if (sz > 0 && temp[sz - 1] > mx) {
        ans += x;
        sz -= k;
        for (long long i = 0; i < k; i++) temp.pop_back();
      }
      if (sz > 0) {
        long long ux = x * (sz / k) + y * (sz % k);
        long long uy = y * sz;
        ans += min(uy, ux);
      }
    }
    cout << ans << '\n';
  }
  return 0;
}
