#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m;
  long long x, y, k;
  cin >> n >> m;
  cin >> x >> k >> y;
  vector<long long> arr;
  vector<long long> brr;
  arr.push_back(0);
  for (long long i = 0; i < n; i++) {
    long long num;
    cin >> num;
    arr.push_back(num);
  }
  arr.push_back(0);
  brr.push_back(0);
  for (long long i = 0; i < m; i++) {
    long long num;
    cin >> num;
    brr.push_back(num);
  }
  brr.push_back(0);
  vector<long long> v;
  long long ans = 0;
  for (long long i = 1, j = 1; i < arr.size(); i++) {
    if (arr[i] != brr[j]) {
      v.push_back(arr[i]);
    } else {
      if (v.size() == 0) {
        j++;
        continue;
      }
      sort(v.begin(), v.end());
      long long sz = v.size();
      long long mx = v[sz - 1];
      long long pash = max(brr[j], brr[j - 1]);
      if (pash < mx && sz < k) {
        cout << -1 << endl;
        return 0;
      } else if (k * y < x) {
        if (mx < pash) {
          ans += sz * y;
        } else
          ans += (sz - k) * y + x;
      } else {
        long long mod = sz % k;
        ans += (sz / k) * x;
        ans += mod * y;
      }
      j++;
      v.clear();
    }
    if (i + 1 == arr.size() && (j) != brr.size()) {
      cout << -1 << endl;
      return 0;
    }
  }
  cout << ans << endl;
}
