#include <bits/stdc++.h>
using namespace std;
/*
#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")
*/
#define ios ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define rep(i,l,r) for (int i=l;i<=r;i++)
#define fi first
#define se second
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define ll long long
#define ull unsigned long long
#define mod 998244353
#define nul(x) memset((x),0,sizeof((x)))
mt19937 mrand(random_device{}());
int rnd(int x) { return mrand() % x;}
ll powmod(ll a,ll b) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
ll n,m,x,k,y;
ll a[200100],b[200100];
vector<ll>v;
bool check(){
ll ind = 1;
v.pb(0);
for (int i=1;i<=n;i++){
if (a[i]==b[ind]){
ind++;
v.pb(i);
}
}
v.pb(n+1);
if (ind==m+1)return true;
else return false;
}
int main(){
ios;
memset(a,0,sizeof(a));
cin>>n>>m;
cin>>x>>k>>y;
for (int i=1;i<=n;i++){
cin>>a[i];
}
for (int i=1;i<=m;i++){
cin>>b[i];
}
if (!check())return cout<<"-1\n",0;
ll sum = 0;
for (int i=1;i<v.size();i++){
if (v[i]-v[i-1]==1)continue;
ll mx=0;
for (int j=v[i-1]+1;j<v[i];j++){
mx = max(mx,a[j]);
}
ll ad = 2e18;
if (max(a[v[i]],a[v[i-1]])>mx){
ad = min(ad, (ll)y * (ll)(v[i]-v[i-1]-1));
}
if ((v[i]-v[i-1]-1) >= k){
ad = min(ad, (ll)x * (ll)((v[i]-v[i-1]-1)/k) + (ll)y * (ll)((v[i]-v[i-1]-1)%k));
ad = min(ad, x + (ll)y * (ll)((v[i]-v[i-1]-1) - k));
}
if (ad == 2e18)return cout<<"-1\n",0;
sum += ad;
}
cout<<sum;
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+Cgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoK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7CiAgICAgICAgICAgIHYucGIoaSk7CiAgICAgICAgfQogICAgfQogICAgdi5wYihuKzEpOwogICAgaWYgKGluZD09bSsxKXJldHVybiB0cnVlOwogICAgZWxzZSByZXR1cm4gZmFsc2U7Cn0KCmludCBtYWluKCl7CiAgICBpb3M7CiAgICBtZW1zZXQoYSwwLHNpemVvZihhKSk7CgogICAgY2luPj5uPj5tOwogICAgY2luPj54Pj5rPj55OwogICAgZm9yIChpbnQgaT0xO2k8PW47aSsrKXsKICAgICAgICBjaW4+PmFbaV07CiAgICB9CiAgICBmb3IgKGludCBpPTE7aTw9bTtpKyspewogICAgICAgIGNpbj4+YltpXTsKICAgIH0KCiAgICBpZiAoIWNoZWNrKCkpcmV0dXJuIGNvdXQ8PCItMVxuIiwwOwoKICAgIGxsIHN1bSA9IDA7CiAgICBmb3IgKGludCBpPTE7aTx2LnNpemUoKTtpKyspewogICAgICAgIGlmICh2W2ldLXZbaS0xXT09MSljb250aW51ZTsKCiAgICAgICAgbGwgbXg9MDsKICAgICAgICBmb3IgKGludCBqPXZbaS0xXSsxO2o8dltpXTtqKyspewogICAgICAgICAgICBteCA9IG1heChteCxhW2pdKTsKICAgICAgICB9CgogICAgICAgIGxsIGFkID0gMmUxODsKICAgICAgICBpZiAobWF4KGFbdltpXV0sYVt2W2ktMV1dKT5teCl7CiAgICAgICAgICAgIGFkID0gbWluKGFkLCAobGwpeSAqIChsbCkodltpXS12W2ktMV0tMSkpOwogICAgICAgIH0KICAgICAgICBpZiAoKHZbaV0tdltpLTFdLTEpID49IGspewogICAgICAgICAgICBhZCA9IG1pbihhZCwgKGxsKXggKiAobGwpKCh2W2ldLXZbaS0xXS0xKS9rKSArIChsbCl5ICogKGxsKSgodltpXS12W2ktMV0tMSklaykpOwogICAgICAgICAgICAKICAgICAgICAgICAgYWQgPSBtaW4oYWQsIHggKyAobGwpeSAqIChsbCkoKHZbaV0tdltpLTFdLTEpIC0gaykpOwogICAgICAgIH0KCiAgICAgICAgaWYgKGFkID09IDJlMTgpcmV0dXJuIGNvdXQ8PCItMVxuIiwwOwoKICAgICAgICBzdW0gKz0gYWQ7CiAgICB9CiAgICBjb3V0PDxzdW07CiAgICByZXR1cm4gMDsKfQo=