#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  long long x, k, y;
  cin >> x >> k >> y;
  int flag = 0;
  if (x <= k * y) flag = 1;
  vector<int> index(n + 1);
  vector<int> a(n + 2, 0);
  vector<int> b(m);
  long long r = 0;
  vector<int> c;
  c.push_back(0);
  for (int i = 1; i < n + 1; ++i) {
    cin >> a[i];
    index[a[i]] = i;
  }
  for (int i = 0; i < m; ++i) {
    cin >> b[i];
    c.push_back(index[b[i]]);
  }
  c.push_back(n + 1);
  int d = (int)c.size();
  int max1, max2;
  int f1 = 0;
  for (int i = 0; i < d - 1; ++i) {
    if (c[i + 1] < c[i]) {
      cout << -1 << endl;
      return 0;
    }
  }
  for (int i = 0; i < d - 1; ++i) {
    max1 = 0;
    max2 = 0;
    max1 = max(a[c[i]], a[c[i + 1]]);
    for (int j = c[i] + 1; j < c[i + 1]; ++j) {
      max2 = max(max2, a[j]);
    }
    if (max2 == 0)
      continue;
    else {
      long long e = c[i + 1] - c[i] - 1;
      if (max2 > max1) {
        if (c[i + 1] - c[i] - 1 < k) {
          f1 = 1;
          break;
        } else {
          if (flag == 1) {
            r += (e / k) * x;
            r += (e % k) * y;
          } else {
            r += x;
            r += (e - k) * y;
          }
        }
      } else {
        if (flag == 1) {
          r += (e / k) * x;
          r += (e % k) * y;
        } else {
          r += e * y;
        }
      }
    }
  }
  if (f1 == 1)
    cout << -1 << endl;
  else {
    cout << r << endl;
  }
}
