#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
int main() {
  long long int n, m;
  cin >> n >> m;
  long long int x, k, y;
  cin >> x >> k >> y;
  long long int ar[n + 10], br[m + 10];
  ar[0] = br[0] = 0;
  for (long long int i = 1; i <= n; i++) {
    cin >> ar[i];
  }
  for (long long int i = 1; i <= m; i++) {
    cin >> br[i];
  }
  ar[++n] = br[++m] = 0;
  vector<long long int> v;
  long long int ans = 0;
  for (long long int i = 1, j = 1; i <= n; i++) {
    if (ar[i] != br[j])
      v.push_back(ar[i]);
    else {
      if ((long long int)v.size() == 0) {
        j++;
        continue;
      }
      sort(v.begin(), v.end());
      long long int mx = max(br[j], br[j - 1]);
      long long int sz = (long long int)v.size();
      if (v[sz - 1] > mx && sz < k) {
        cout << -1 << "\n";
        return 0;
      }
      if (x > y * k) {
        if (v[sz - 1] > mx)
          ans += (sz - k) * y + x;
        else
          ans += sz * y;
      } else {
        long long int mod = sz % k;
        ans += mod * y + (sz / k) * x;
      }
      j++;
      v.clear();
    }
    if (i == n && j != m + 1) {
      cout << -1 << "\n";
      return 0;
    }
  }
  cout << ans << "\n";
}
