#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, m, x, k, y;
  cin >> n >> m;
  cin >> x >> k >> y;
  vector<int> a(n);
  for (int i = (0); i < (n); ++i) cin >> a[i];
  vector<int> b(n);
  for (int i = (0); i < (m); ++i) cin >> b[i];
  int bdex = 0;
  vector<pair<int, int>> borders;
  int lef = -1;
  int gcnt = 0;
  for (int i = (0); i < (n); ++i) {
    if (bdex < m && b[bdex] == a[i]) {
      if (gcnt > 0) {
        borders.push_back({lef, i});
      }
      lef = i;
      ++bdex;
      gcnt = 0;
    } else {
      ++gcnt;
      if (i == n - 1) borders.push_back({lef, i + 1});
    }
  }
  if (bdex < m) {
    cout << -1 << '\n';
    return 0;
  }
  bool fireok = x <= y * k;
  long long ans = 0;
  int mx;
  bool mxatbor;
  for (auto& bor : borders) {
    mx = *max_element(begin(a) + max(0, bor.first),
                      begin(a) + min(bor.second + 1, n));
    mxatbor = (bor.first >= 0 && mx == a[bor.first]) ||
              (bor.second < n && mx == a[bor.second]);
    if (!mxatbor && bor.second - bor.first - 1 < k) {
      cout << -1 << '\n';
      return 0;
    }
    if (!mxatbor) {
      ans += x;
      bor.first += k;
    }
    if (fireok) {
      while (bor.second - bor.first - 1 >= k) {
        ans += x;
        bor.first += k;
      }
    }
    ans += (long long)(bor.second - bor.first - 1) * (long long)y;
  }
  cout << ans << '\n';
  return 0;
}
