#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
long long A[N], B[N], bucket[N];
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  long long first, second, k;
  scanf("%lld %lld %lld", &first, &k, &second);
  for (int i = (1); i <= (n); ++i) scanf("%lld", &A[i]);
  for (int i = (1); i <= (m); ++i) scanf("%lld", &B[i]);
  int ptr = 0;
  long long mx = 0, cnt = 0;
  long long ans = 0;
  for (int i = (1); i <= (n); ++i) {
    if (ptr < m && A[i] == B[ptr + 1]) {
      ++ptr;
      bucket[ptr] = i;
      if (mx == 0) {
        mx = cnt = 0;
        continue;
      }
      if (cnt >= k) {
        long long add = (cnt / k) * first + (cnt % k) * second;
        if (mx < max(B[ptr], B[ptr - 1]))
          add = min(add, cnt * second);
        else
          add = min(add, first + (cnt - k) * second);
        ans += add;
      } else {
        if (mx < max(B[ptr], B[ptr - 1]))
          ans += cnt * second;
        else
          return !printf("-1");
      }
      mx = cnt = 0;
    } else {
      mx = max(mx, A[i]);
      ++cnt;
    }
  }
  if (ptr != m) return !printf("-1");
  if (cnt >= k) {
    long long add = (cnt / k) * first + (cnt % k) * second;
    if (mx < B[m])
      add = min(add, cnt * second);
    else
      add = min(add, first + (cnt - k) * second);
    ans += add;
  } else {
    if (mx < B[m])
      ans += cnt * second;
    else
      return !printf("-1");
  }
  printf("%lld", ans);
  return 0;
}
