#include <bits/stdc++.h>
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using namespace std;
const int N = 2e5 + 3;
int n, m, x, k, y, a[N], b[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n >> m >> x >> k >> y;
  for (int i = (1); i <= (n); ++i) cin >> a[i];
  for (int i = (1); i <= (m); ++i) cin >> b[i];
  b[m + 1] = a[n + 1] = 0;
  n++, m++;
  if (m > n) {
    cout << -1;
    return 0;
  }
  int ib = 1, ia = 1;
  ll ans = 0;
  bool ok = 1;
  while (ib <= m && ia <= n) {
    int mx = 0, lia = ia;
    while (ia <= n && a[ia] != b[ib]) {
      mx = max(mx, a[ia]);
      ia++;
    }
    if (ia > n) break;
    if (mx > max(b[ib], b[ib - 1]) && (ia - lia) < k) break;
    int num = ia - lia;
    if (k * 1ll * y >= x)
      ans += (num / k) * 1ll * x + (num % k) * 1ll * y;
    else {
      if (mx > max(b[ib], b[ib - 1]))
        ans += x + (num - k) * 1ll * y;
      else
        ans += num * 1ll * y;
    }
    ia++, ib++;
  }
  if (ib <= m || ia <= n) ok = 0;
  if (ok)
    cout << ans;
  else
    cout << -1;
  return 0;
}
