#include <bits/stdc++.h>
using namespace std;
const int MAX_INT = 2147483647;
const long long MAX_LL = 9223372036854775807;
int main() {
  int n, m;
  cin >> n >> m;
  vector<long long> a(n), b(m);
  long long x, k, y;
  cin >> x >> k >> y;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < m; i++) cin >> b[i];
  a.push_back(-1);
  b.push_back(-1);
  int index = 0;
  long long ans = 0;
  int last = -1;
  long long maximum = -1;
  for (int i = 0; i <= n; i++) {
    if (a[i] == b[index]) {
      int between = i - last - 1;
      if (between >= k) {
        long long toAdd = (between / k) * x + (between % k) * y;
        if (maximum < b[index] || (index > 0 && maximum < b[index - 1])) {
          toAdd = min(toAdd, between * y);
        } else {
          toAdd = min(toAdd, x + (between - k) * y);
        }
        ans += toAdd;
      } else if (between != 0) {
        if (maximum < b[index] || (index > 0 && maximum < b[index - 1])) {
          ans += between * y;
        } else {
          ans = -1;
          break;
        }
      }
      ++index;
      maximum = -1;
      last = i;
    } else {
      maximum = max(maximum, a[i]);
    }
  }
  if (index != m + 1) ans = -1;
  cout << ans << endl;
  return 0;
}
