#include <bits/stdc++.h>
using namespace std;
long long n, m;
int main() {
  cin >> n;
  cin >> m;
  long long fire_len, fire_cost, bers_cost;
  cin >> fire_cost >> fire_len >> bers_cost;
  vector<long long> was(n);
  vector<long long> need(m);
  for (int i = 0; i < n; i++) {
    cin >> was[i];
  }
  for (int i = 0; i < m; i++) {
    cin >> need[i];
  }
  int j = 0, i = 0, dead_count = 0;
  bool havitprob = false;
  bool canwedo = true;
  long long final_count = 0;
  for (i; i < n; i++) {
    if (was[i] == need[j]) {
      j++;
      if (havitprob) {
        if (dead_count >= fire_len) {
          if (fire_len * bers_cost > fire_cost) {
            final_count = final_count + fire_cost * (dead_count / fire_len) +
                          bers_cost * (dead_count % fire_len);
            break;
          } else {
            final_count =
                final_count + fire_cost + bers_cost * (dead_count - fire_len);
            break;
          }
        } else {
          canwedo = false;
          break;
        }
      } else {
        if (dead_count >= fire_len) {
          if (fire_len * bers_cost > fire_cost) {
            final_count = final_count + fire_cost * (dead_count / fire_len) +
                          bers_cost * (dead_count % fire_len);
            break;
          } else {
            final_count = final_count + dead_count * bers_cost;
            break;
          }
        } else {
          final_count = final_count + dead_count * bers_cost;
          break;
        }
      }
    } else {
      dead_count++;
      if (was[i] > need[j]) {
        havitprob = true;
      }
    }
  }
  havitprob = false;
  dead_count = 0;
  ++i;
  for (i; (i < n) && (j < m); i++) {
    if (was[i] == need[j]) {
      j++;
      if (havitprob) {
        if (dead_count >= fire_len) {
          if (fire_len * bers_cost > fire_cost) {
            final_count = final_count + fire_cost * (dead_count / fire_len) +
                          bers_cost * (dead_count % fire_len);
          } else {
            final_count =
                final_count + fire_cost + bers_cost * (dead_count - fire_len);
          }
        } else {
          canwedo = false;
        }
      } else {
        if (dead_count >= fire_len) {
          if (fire_len * bers_cost > fire_cost) {
            final_count = final_count + fire_cost * (dead_count / fire_len) +
                          bers_cost * (dead_count % fire_len);
          } else {
            final_count = final_count + dead_count * bers_cost;
          }
        } else {
          final_count = final_count + dead_count * bers_cost;
        }
      }
      havitprob = false;
      dead_count = 0;
    } else {
      dead_count++;
      if ((was[i] > need[j]) && (was[i] > need[j - 1])) {
        havitprob = true;
      }
    }
  }
  dead_count = 0;
  havitprob = false;
  for (i; i < n; i++) {
    dead_count++;
    if (was[i] > need[j - 1]) {
      havitprob = true;
    }
  }
  if (havitprob) {
    if (dead_count >= fire_len) {
      if (fire_len * bers_cost > fire_cost) {
        final_count = final_count + fire_cost * (dead_count / fire_len) +
                      bers_cost * (dead_count % fire_len);
      } else {
        final_count =
            final_count + fire_cost + bers_cost * (dead_count - fire_len);
      }
    } else {
      canwedo = false;
    }
  } else {
    if (dead_count >= fire_len) {
      if (fire_len * bers_cost > fire_cost) {
        final_count = final_count + fire_cost * (dead_count / fire_len) +
                      bers_cost * (dead_count % fire_len);
      } else {
        final_count = final_count + dead_count * bers_cost;
      }
    } else {
      final_count = final_count + dead_count * bers_cost;
    }
  }
  if (canwedo && (j == m) && (i == n)) {
    cout << final_count;
  } else {
    cout << -1;
  }
  return 0;
}
