#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
using namespace std;
const int N = 200003, mod = 1e9 + 7;
const long long inf = (1e18 + 11);
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long ans = 0, di, ma, k;
  int n, m;
  cin >> n >> m;
  int x, y;
  cin >> x >> k >> y;
  int a[n + 3], b[m + 3], i, j, l;
  a[0] = 0, a[n + 1] = 0, b[0] = 0, b[m + 1] = 0;
  for (i = 1; i <= n; ++i) cin >> a[i];
  for (i = 1; i <= m; ++i) cin >> b[i];
  for (i = 1, j = 1; i <= n; ++i) {
    if (j > m) goto takecare;
    if (a[i] == b[j]) {
      ++j;
      continue;
    } else {
    takecare:
      l = i, ma = 0;
      while (i <= n and a[i] != b[j]) ma = max(ma, a[i] * 1ll), ++i;
      if (i > n and j <= m) return cout << -1, 0;
      di = i - l;
      if (ma < b[j] or ma < b[j - 1]) {
        if (x <= k * y)
          ans += (di / k) * x + (di % k) * y;
        else
          ans += di * y;
      } else {
        if (di < k)
          return cout << -1, 0;
        else {
          if (x <= k * y)
            ans += (di / k) * x + (di % k) * y;
          else
            ans += x + (di - k) * y;
        }
      }
      if (j > m) break;
      ++j;
    }
  }
  if (j <= m)
    cout << -1;
  else
    cout << ans;
  return 0;
}
