import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Vector;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.util.Comparator;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author xwchen
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskD {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int m = in.nextInt();
            long x = in.nextLong();
            int k = in.nextInt();
            long y = in.nextLong();
            int[] a = in.nextIntArray(n);
            int[] b = in.nextIntArray(m);
            int preI = -1;
            int i = 0;
            int j = 0;
            boolean OK = true;
            long cost = 0;
            while (i <= n || j < m) {
                if (i < n && (j >= m || a[i] != b[j])) {
                    ++i;
                } else {
                    if (i >= n && j < m) {
                        OK = false;
                        break;
                    }
                    //System.out.println(i + " " + j + " " + cost);

                    int nowI = i;
                    int len = nowI - preI - 1;
                    //System.out.println("len = " + len);
                    if (k * y >= x) {
                        if (len >= k) {
                            cost += len / k * x + len % k * y;
                            //System.out.println(i + " " + j + " " + cost);
                        } else {
                            int mx = 0;
                            for (int p = preI + 1; p < nowI; ++p) {
                                if (mx < a[p]) {
                                    mx = a[p];
                                }
                            }
                            Vector<Integer> boarder = new Vector<>();
                            if (preI > 0) {
                                boarder.add(a[preI]);
                            }
                            if (nowI < n) {
                                boarder.add(a[nowI]);
                            }
                            boarder.sort(Comparator.comparingInt(o -> o));
                            if (!boarder.isEmpty() && boarder.lastElement() < mx) {
                                OK = false;
                            } else {
                                cost += len * y;
                                //System.out.println(i + " " + j + " " + cost);
                            }
                        }
                    } else {
                        int mx = 0;
                        for (int p = preI + 1; p < nowI; ++p) {
                            if (mx < a[p]) {
                                mx = a[p];
                            }
                        }
                        Vector<Integer> boarder = new Vector<>();
                        if (preI > 0) {
                            boarder.add(a[preI]);
                        }
                        if (nowI < n) {
                            boarder.add(a[nowI]);
                        }
                        boarder.sort(Comparator.comparingInt(o -> o));
                        if (!boarder.isEmpty() && boarder.lastElement() < mx) {
                            if (len >= k) {
                                cost += x + y * (len - k);
                            } else {
                                OK = false;
                            }
                        } else {
                            cost += len * y;
                        }
                    }
                    preI = i;
                    ++i;
                    ++j;
                }
            }
            if (OK) {
                out.println(cost);
            } else {
                out.println(-1);
            }
        }

    }

    static class InputReader {
        private BufferedReader reader;
        private StringTokenizer tokenizer = new StringTokenizer("");

        public InputReader(InputStream inputStream) {
            this.reader = new BufferedReader(
                    new InputStreamReader(inputStream));
        }

        public String next() {
            while (!tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public int[] nextIntArray(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = nextInt();
            return a;
        }

    }
}


import java.util.*;
import java.io.*;
public class d {
	static final FS sc = new FS();
	static final PrintWriter pw = new PrintWriter(System.out);

	static final long big = Long.MAX_VALUE / 8;

	static int n, m, k;
	static long x, y;
	static int[] a, b, idxOf;
	static long out;
	public static void main(String[] args) {
		n = sc.nextInt();
		m = sc.nextInt();
		x = sc.nextInt();
		k = sc.nextInt();
		y = sc.nextInt();

		a = new int[n];
		idxOf = new int[n + 1];
		for(int i = 0; i < n; ++i) {
			a[i] = sc.nextInt();
			idxOf[a[i]] = i;
		}

		b = new int[m];
		for(int i = 0; i < m; ++i) b[i] = sc.nextInt();

		out = 0;
		int prevAI = -1;
		for(int i = 0; i < m; ++i) {
			int currAI = idxOf[b[i]];

			// b is not a subsequence of a
			if(currAI < prevAI) {
				System.out.println(-1);
				return;
			}

			if(currAI - prevAI > 1 && !solve(prevAI + 1, currAI - 1)) {
				System.out.println(-1);
				return;
			}

			prevAI = currAI;
		}

		if(prevAI < n - 1 && !solve(prevAI + 1, n - 1)) {
			System.out.println(-1);
			return;
		}

		pw.println(out);
		pw.flush();
	}
	static boolean solve(int l, int r) {
		int num = r - l + 1, max = 0;
		for(int i = l; i <= r; ++i) max = Math.max(max, a[i]);

		int lVal = 0, rVal = 0;
		if(l - 1 >= 0) lVal = a[l - 1];
		if(r + 1 < n) rVal = a[r + 1];

		long minOut = big;

		// try doing zero fire balls
		if(max < Math.max(lVal, rVal)) {
			minOut = Math.min(minOut, num * y);
		}

		for(int numFireballs = 1; numFireballs * k <= num; ++numFireballs) {
			long curr = x * numFireballs;
			curr += y * (num - numFireballs * k);

			minOut = Math.min(minOut, curr);
		}

		if(minOut == big) return false;

		out += minOut;
		return true;
	}
	static class FS {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer("");
		String next() {
			while(!st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch(Exception e) {}
			}
			return st.nextToken();
		}
		int nextInt() {
			return Integer.parseInt(next());
		}
		long nextLong() {
			return Long.parseLong(next());
		}
	}
}


import java.util.*;
import java.io.*;

public class Codechef {
	public static void main(String[] args) {
		 Scanner in = new Scanner(System.in);
        PrintWriter pw=new PrintWriter(System.out);
		 int n = in.nextInt();
		 int m = in.nextInt();
		 int x = in.nextInt();
		 int k = in.nextInt();
		 int y = in.nextInt();
		 int[] a = new int[n];
		 int[] b = new int[m];
		for (int i = 0; i < n; i++)
			a[i] = in.nextInt();
		for (int i = 0; i < m; i++)
			b[i] = in.nextInt();

		int i = 0, j = 0;
		for (; i < n && j < m; i++)
			if (a[i] == b[j])
				j++;
		if (j < m) {
			pw.println(-1);
			pw.flush();
			return;
		}

		long mana = 0;
		i = j = 0;
		while (i < n) {
			while (i < n && j < m && a[i] == b[j]) {
				i++;
				j++;
			}
			if (i >= n)
				break;
			int end = i + 1;
			while (end < n && (j >= m || a[end] != b[j]))
				end++;

			Arrays.sort(a, i, end);
			long berserk = (end - i) % k, fireball = (end - i) / k;
			if (y <= x / k) {
				berserk += fireball * k;
				fireball = 0;
			}
			if (berserk > 0 && fireball == 0) {
				boolean ok = true;
				for (int check = i; ok && check < end - fireball * k; check++)
					if (!(i > 0 && a[i - 1] > a[check] || end < n && a[end] > a[check]))
						ok = false;

				if (!ok) {
					if (berserk / k == 0) {
						j = -1;
						break;
					}
					berserk -= k;
					fireball++;
				}
			}

			mana += berserk * y + fireball * x;

			i = end;
		}
		pw.println(j < m ? -1 : mana);
		pw.flush();
	}
}


/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author ujjwal abhishek
 */
import java.util.*;
import java.io.*;
public class Fireball
{
    public static void main(String args[])throws IOException
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out=new PrintWriter(new OutputStreamWriter(System.out));
        StringTokenizer str=new StringTokenizer(br.readLine());
        int n=Integer.parseInt(str.nextToken());
        int m=Integer.parseInt(str.nextToken());
        str=new StringTokenizer(br.readLine());
        long x=Long.parseLong(str.nextToken());
        long k=Long.parseLong(str.nextToken());
        long y=Long.parseLong(str.nextToken());
        long ky=k*y;
        int good=1;
        if (x<=ky)
            good=0;
        int[] a=new int[n+2];
        int[] b=new int[m+2];
        int[] bin=new int[m+2];
        int[] rmax=new int[m+2];
        b[0]=-1;
        b[m+1]=-1;
        bin[0]=0;
        bin[m+1]=n+1;
        a[0]=-1;
        a[n+1]=-1;
        str=new StringTokenizer(br.readLine());
        for (int i=1;i<=n;i++)
            a[i]=Integer.parseInt(str.nextToken());
        int ai=0;
        int fail=0;
        str=new StringTokenizer(br.readLine());
        for (int i=1;i<m+1;i++)
        {
            b[i]=Integer.parseInt(str.nextToken());
            while (a[ai]!=b[i] && ai<=n)
            {
                ai++;
            }
            if (ai>n)
            {
                fail=1;
                break;
            }
            bin[i]=ai;
        }
        long cnt=0;
        if (fail==0)
        {
            for (int i=0;i<=m;i++)
            {
                for (int j=bin[i];j<=bin[i+1];j++)
                {
                    if (rmax[i]<a[j])
                        rmax[i]=a[j];
                }
            }
            for (int i=0;i<=m;i++)
            {
                int num=bin[i+1]-bin[i]-1;
                if (num==0)
                    continue;
                int bp=(int) (num%k);
                int fp=(int) (num/k);
                if (fp==0)
                {
                    if ((rmax[i]!=a[bin[i]]) && (rmax[i]!=a[bin[i+1]]))
                    {
                        fail=1;
                        break;
                    }
                    else
                        cnt+=(long)bp*y;
                }
                else if(good==1)
                {
                    if ((rmax[i]!=a[bin[i]]) && (rmax[i]!=a[bin[i+1]]))
                        cnt+=(x+(long)(num-k)*y);
                    else
                        cnt+=(long)num*y;
                }
                else
                {
                    cnt+= (long)fp*x + (long)bp*y;
                }
            }
        }
        if (fail==0)
            out.println(cnt);
        else
            out.println(-1);
        out.close();
    }
}


/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author ujjwal abhishek
 */
import java.util.*;
import java.io.*;
public class Fireball
{
    public static void main(String args[])throws IOException
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out=new PrintWriter(new OutputStreamWriter(System.out));
        StringTokenizer str=new StringTokenizer(br.readLine());
        int n=Integer.parseInt(str.nextToken());
        int m=Integer.parseInt(str.nextToken());
        str=new StringTokenizer(br.readLine());
        long x=Long.parseLong(str.nextToken());
        long k=Integer.parseInt(str.nextToken());
        long y=Long.parseLong(str.nextToken());
        long ky=k*y;
        int good=1;
        if (x<=ky)
            good=0;
        int[] a=new int[n+2];
        int[] b=new int[m+2];
        int[] bin=new int[m+2];
        int[] rmax=new int[m+2];
        b[0]=-1;
        b[m+1]=-1;
        bin[0]=0;
        bin[m+1]=n+1;
        a[0]=-1;
        a[n+1]=-1;
        str=new StringTokenizer(br.readLine());
        for (int i=1;i<=n;i++)
            a[i]=Integer.parseInt(str.nextToken());
        int ai=0;
        int fail=0;
        str=new StringTokenizer(br.readLine());
        for (int i=1;i<m+1;i++)
        {
            b[i]=Integer.parseInt(str.nextToken());
            while (a[ai]!=b[i] && ai<=n)
            {
                ai++;
            }
            if (ai>n)
            {
                fail=1;
                break;
            }
            bin[i]=a[i];
        }
        long cnt=0;
        if (fail==0)
        {
            for (int i=0;i<=m;i++)
            {
                for (int j=bin[i];j<=bin[i+1];j++)
                {
                    if (rmax[i]<a[j])
                        rmax[i]=a[j];
                }
            }
            for (int i=0;i<=m;i++)
            {
                int num=bin[i+1]-bin[i]-1;
                if (num==0)
                    continue;
                int bp=(int)(num%k);
                int fp=(int)(num/k);
                if (fp==0)
                {
                    if ((rmax[i]!=a[bin[i]]) && (rmax[i]!=a[bin[i+1]]))
                    {
                        fail=1;
                        break;
                    }
                    else
                        cnt+=(long)bp*y;
                }
                else if(good==1)
                {
                    if ((rmax[i]!=a[bin[i]]) && (rmax[i]!=a[bin[i+1]]))
                        cnt+=(x+(long)((num-k)*y));
                    else
                        cnt+=(long)num*y;
                }
                else
                {
                    cnt+=(long)fp*x + (long)bp*y;
                }
            }
        }
        if (fail==0)
            out.println(cnt);
        else
            out.println(-1);
        out.close();
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.StringTokenizer;

public class D {

	static long fireballCost, fireballRange, berserkCost;

	public static void main(String[] args) {
		FastScanner fs=new FastScanner();
		int n=fs.nextInt();
		int nKeep=fs.nextInt();
		fireballCost=fs.nextInt();
		fireballRange=fs.nextInt();
		berserkCost=fs.nextInt();
		int[] perm=fs.readArray(n);
		for (int i=0; i<n; i++) perm[i]--;
		int[] indexOf=new int[n];
		for (int i=0; i<n; i++) indexOf[perm[i]]=i;

		int lastIndexOf=-1;
		boolean[] keep=new boolean[n];
		for (int i=0; i<nKeep; i++) {
			int nextThing=fs.nextInt()-1;
			keep[nextThing]=true;
			int nextIndex=indexOf[nextThing];
			if (nextIndex<lastIndexOf) {
				System.out.println(-1);
				return;
			}
			lastIndexOf=nextIndex;
		}

		boolean possible=true;
		long cost=0;
		int firstIndex=-1, lastIndex=-1;
		ArrayList<Integer> prefix=new ArrayList<>();
		for (int i=0; i<n; i++) {
			if (keep[perm[i]]) {
				long res=minCost(prefix, -1, perm[i]);
				if (res==-1) possible=false;
				else cost+=res;
				firstIndex=i;
				break;
			}
			else {
				prefix.add(perm[i]);
			}
		}
		prefix.clear();
		for (int i=n-1; i>=0; i--) {
			if (keep[perm[i]]) {
				long res=minCost(prefix, perm[i], -1);
				if (res==-1) possible=false;
				else cost+=res;
				lastIndex=i;
				break;
			}
			else {
				prefix.add(perm[i]);
			}
		}
		if (!possible) {
			System.out.println(-1);
			return;
		}

		for (int i=firstIndex; i!=lastIndex;) {
			int next=i+1;
			prefix.clear();
			while (!keep[perm[next]]) {
				prefix.add(perm[next]);
				next++;
			}
			long res=minCost(prefix, perm[i], perm[next]);
			if (res==-1) possible=false;
			else cost+=res;
			i=next;
		}
		System.out.println(cost);
	}

	//-1 if impossible, otherwise min cost
	static long minCost(ArrayList<Integer> middle, int l, int r) {
		if (middle.isEmpty()) return 0;
		long best=Long.MAX_VALUE;
		Collections.sort(middle);
		for (int toUse=0; toUse<=middle.size(); toUse++) {
			if ((middle.size()-toUse)%fireballRange!=0) {
				continue;
			}
			if (toUse==middle.size()) {
				if (Math.max(l, r)>middle.get(middle.size()-1)) {
					best=Math.min(best, berserkCost*middle.size());
				}
				continue;
			}
			best=Math.min(best, berserkCost*toUse + fireballCost*(middle.size()-toUse)/fireballRange);
		}
		return best==Long.MAX_VALUE?-1:best;
	}

	static void sort(int[] a) {
		ArrayList<Integer> l=new ArrayList<>();
		for (int i:a) l.add(i);
		Collections.sort(l);
		for (int i=0; i<a.length; i++) a[i]=l.get(i);
	}

	static class FastScanner {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");
		String next() {
			while (!st.hasMoreTokens())
				try {
					st=new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}
		int[] readArray(int n) {
			int[] a=new int[n];
			for (int i=0; i<n; i++) a[i]=nextInt();
			return a;
		}
		long nextLong() {
			return Long.parseLong(next());
		}
	}

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.StringTokenizer;

public class D {

	static long fireballCost, fireballRange, berserkCost;

	public static void main(String[] args) {
		FastScanner fs=new FastScanner();
		int n=fs.nextInt();
		int nKeep=fs.nextInt();
		fireballCost=fs.nextInt();
		fireballRange=fs.nextInt();
		berserkCost=fs.nextInt();
		int[] perm=fs.readArray(n);
		for (int i=0; i<n; i++) perm[i]--;
		int[] indexOf=new int[n];
		for (int i=0; i<n; i++) indexOf[perm[i]]=i;

		int lastIndexOf=-1;
		boolean[] keep=new boolean[n];
		for (int i=0; i<nKeep; i++) {
			int nextThing=fs.nextInt()-1;
			keep[nextThing]=true;
			int nextIndex=indexOf[nextThing];
			if (nextIndex<lastIndexOf) {
				System.out.println(-1);
				return;
			}
			lastIndexOf=nextIndex;
		}

		boolean possible=true;
		long cost=0;
		int firstIndex=-1, lastIndex=-1;
		ArrayList<Integer> prefix=new ArrayList<>();
		for (int i=0; i<n; i++) {
			if (keep[perm[i]]) {
				long res=minCost(prefix, -1, perm[i]);
				if (res==-1) possible=false;
				else cost+=res;
				firstIndex=i;
				break;
			}
			else {
				prefix.add(perm[i]);
			}
		}
		prefix.clear();
		for (int i=n-1; i>=0; i--) {
			if (keep[perm[i]]) {
				long res=minCost(prefix, perm[i], -1);
				if (res==-1) possible=false;
				else cost+=res;
				lastIndex=i;
				break;
			}
			else {
				prefix.add(perm[i]);
			}
		}
		if (!possible) {
			System.out.println(-1);
			return;
		}

		for (int i=firstIndex; i!=lastIndex;) {
			int next=i+1;
			prefix.clear();
			while (!keep[perm[next]]) {
				prefix.add(perm[next]);
				next++;
			}
			long res=minCost(prefix, perm[i], perm[next]);
			if (res==-1) possible=false;
			else cost+=res;
			i=next;
		}
		System.out.println(cost);
	}

	//-1 if impossible, otherwise min cost
	static long minCost(ArrayList<Integer> middle, int l, int r) {
		if (middle.isEmpty()) return 0;
		long best=Long.MAX_VALUE;
		Collections.sort(middle);
		for (int toUse=0; toUse<=middle.size(); toUse++) {
			if ((middle.size()-toUse)%fireballRange!=0) {
				continue;
			}
			if (toUse==middle.size()) {
				if (Math.max(l, r)>middle.get(middle.size()-1)) {
					best=Math.min(best, berserkCost*middle.size());
				}
				continue;
			}
			best=Math.min(best, berserkCost*toUse + fireballCost*((middle.size()-toUse)/fireballRange));
		}
		return best==Long.MAX_VALUE?-1:best;
	}

	static void sort(int[] a) {
		ArrayList<Integer> l=new ArrayList<>();
		for (int i:a) l.add(i);
		Collections.sort(l);
		for (int i=0; i<a.length; i++) a[i]=l.get(i);
	}

	static class FastScanner {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");
		String next() {
			while (!st.hasMoreTokens())
				try {
					st=new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}
		int[] readArray(int n) {
			int[] a=new int[n];
			for (int i=0; i<n; i++) a[i]=nextInt();
			return a;
		}
		long nextLong() {
			return Long.parseLong(next());
		}
	}

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.StringTokenizer;

/*
3 2
10 1 1
2 3 1
2 1
 */
public class D {

	static long fireballCost, fireballRange, berserkCost;

	public static void main(String[] args) {
		FastScanner fs=new FastScanner();
		int n=fs.nextInt();
		int nKeep=fs.nextInt();
		fireballCost=fs.nextInt();
		fireballRange=fs.nextInt();
		berserkCost=fs.nextInt();
		int[] perm=fs.readArray(n);
		for (int i=0; i<n; i++) perm[i]--;
		int[] indexOf=new int[n];
		for (int i=0; i<n; i++) indexOf[perm[i]]=i;

		int lastIndexOf=-1;
		boolean[] keep=new boolean[n];
		for (int i=0; i<nKeep; i++) {
			int nextThing=fs.nextInt()-1;
			keep[nextThing]=true;
			int nextIndex=indexOf[nextThing];
			if (nextIndex<lastIndexOf) {
				System.out.println(-1);
				return;
			}
			lastIndexOf=nextIndex;
		}

		boolean possible=true;
		long cost=0;
		int firstIndex=-1, lastIndex=-1;
		ArrayList<Integer> prefix=new ArrayList<>();
		for (int i=0; i<n; i++) {
			if (keep[perm[i]]) {
				long res=minCost(prefix, -1, perm[i]);
				if (res==-1) possible=false;
				else cost+=res;
				firstIndex=i;
				break;
			}
			else {
				prefix.add(perm[i]);
			}
		}
		prefix.clear();
		for (int i=n-1; i>=0; i--) {
			if (keep[perm[i]]) {
				long res=minCost(prefix, perm[i], -1);
				if (res==-1) possible=false;
				else cost+=res;
				lastIndex=i;
				break;
			}
			else {
				prefix.add(perm[i]);
			}
		}
		if (!possible) {
			System.out.println(-1);
			return;
		}

		for (int i=firstIndex; i!=lastIndex;) {
			int next=i+1;
			prefix.clear();
			while (!keep[perm[next]]) {
				prefix.add(perm[next]);
				next++;
			}
			long res=minCost(prefix, perm[i], perm[next]);
			if (res==-1) possible=false;
			else cost+=res;
			i=next;
		}
		if (!possible) {
			System.out.println(-1);
			return;
		}

		System.out.println(cost);
	}

	//-1 if impossible, otherwise min cost
	static long minCost(ArrayList<Integer> middle, int l, int r) {
		if (middle.isEmpty()) return 0;
		long best=Long.MAX_VALUE;
		Collections.sort(middle);
		for (int toUse=0; toUse<=middle.size(); toUse++) {
			if ((middle.size()-toUse)%fireballRange!=0) {
				continue;
			}
			if (toUse==middle.size()) {
				if (Math.max(l, r)>middle.get(middle.size()-1)) {
					best=Math.min(best, berserkCost*middle.size());
				}
				continue;
			}
			best=Math.min(best, berserkCost*toUse + fireballCost*((middle.size()-toUse)/fireballRange));
		}
		return best==Long.MAX_VALUE?-1:best;
	}

	static void sort(int[] a) {
		ArrayList<Integer> l=new ArrayList<>();
		for (int i:a) l.add(i);
		Collections.sort(l);
		for (int i=0; i<a.length; i++) a[i]=l.get(i);
	}

	static class FastScanner {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");
		String next() {
			while (!st.hasMoreTokens())
				try {
					st=new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}
		int[] readArray(int n) {
			int[] a=new int[n];
			for (int i=0; i<n; i++) a[i]=nextInt();
			return a;
		}
		long nextLong() {
			return Long.parseLong(next());
		}
	}

}


import java.util.*;
import java.io.*;
public class EdE {

	public static void main(String[] args) throws Exception{
		int num = 998244353;

		// TODO Auto-generated method stub
 		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
 		PrintWriter out = new PrintWriter(System.out);

 		StringTokenizer st = new StringTokenizer(bf.readLine());
 		int n = Integer.parseInt(st.nextToken());
 		int m = Integer.parseInt(st.nextToken());
 		StringTokenizer st1 = new StringTokenizer(bf.readLine());
 		long x = Long.parseLong(st1.nextToken());
 		int k = Integer.parseInt(st1.nextToken());
 		long y = Long.parseLong(st1.nextToken());
 		ArrayList<Integer> indices = new ArrayList<Integer>();
 		int[] array = new int[n];
 		int[] b = new int[m];
 		StringTokenizer st2 = new StringTokenizer(bf.readLine());
 		for(int i = 0;i<n;i++){
 			array[i] = Integer.parseInt(st2.nextToken());
 		}
 		StringTokenizer st3 = new StringTokenizer(bf.readLine());
 		for(int i = 0;i<m;i++){
 			b[i] = Integer.parseInt(st3.nextToken());
 		}
 		indices.add(-1);
 		int bindex = 0;
 		for(int i = 0;i<n && bindex < m;i++){
 			if (array[i] == b[bindex]){
 				indices.add(i);
 				bindex++;
 			}
 		}
 		indices.add(n);
 		if (bindex!= m){
 			out.println(-1);
 			out.close();
 		}
 		else{
 			long sum = 0;
 			for(int i = 0;i<indices.size()-1;i++){
 				int side1 = 0;
				int side2 = 0;
				if (indices.get(i) >= 0 && indices.get(i) < n)
					side1 = array[indices.get(i)];
				if (indices.get(i+1) >= 0 && indices.get(i+1) < n)
					side2 = array[indices.get(i+1)];
				boolean anythingGreater = false;
	 			for(int j = indices.get(i)+1;j<indices.get(i+1);j++)
	 				if (array[j] > side1 && array[j] > side2)
	 					anythingGreater = true;
	 			long length = indices.get(i+1) - indices.get(i) - 1;
 				if (y*k <= x){
 	 				if (!anythingGreater)
 	 					sum+= (y*length);
 	 				else{
 	 					if (length < k){
 	 						out.println(-1);
 	 						out.close();
 	 					}
 	 					else{
 	 						sum+= (x + y*(length-k));
 	 					}
 	 				}
 				}
 				else{
 					if (anythingGreater && length < k){
 						out.println(-1);
 						out.close();
 					}
 					else{
 						long left = length%k;
 						long fireball = length/k;
 						sum+= (fireball*x + left*y);
 					}
 				}
 			}
 			out.println(sum);
 			out.close();
 		}

 	}
}

//StringJoiner sj = new StringJoiner(" ");
//sj.add(strings)
//sj.toString() gives string of those stuff w spaces or whatever that sequence is


import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;

public class Second {
	static Scanner sc =new Scanner(System.in);
	static PrintWriter out=new PrintWriter(System.out);

	public static void BerlandPoker() {
		int t=sc.nextInt();
		for(int o=0;o<t;o++) {
			int n=sc.nextInt();
			int m=sc.nextInt();
			int k=sc.nextInt();
			int numOfCards=n/k;
			if(numOfCards>=m)
				System.out.println(m);
			else if(n==m)
				System.out.println(0);
			else {
				k--;
				m-=numOfCards;
				if(m<=k) {
					System.out.println(numOfCards-1);
				}
				else {
				int d=m/k;
				int mod=m%k;
				if(mod!=0)
			      System.out.println(numOfCards-(d+1));
				else
				  System.out.println(numOfCards-(d));

				}
			}
		}
	}

	public static void TheatreSquare() {
		double n=sc.nextInt();
		double m=sc.nextInt();
		double a=sc.nextInt();
		System.out.println((long)(((long)Math.ceil(n/a))*((long)Math.ceil(m/a))));

	}

	public static void NewTheatreSquare() {
		int t=sc.nextInt();
		for(int o=0;o<t;o++) {
			int n=sc.nextInt();
			int m=sc.nextInt();
			int x=sc.nextInt();
			int y=sc.nextInt();
			sc.nextLine();
			int c=0;
			char[][]grid=new char[n][m];
			for(int i=0;i<n;i++) {
				grid[i]=sc.nextLine().toCharArray();
			}
			for(int i=0;i<n;i++) {
				for(int j=0;j<m;j++) {
					if(grid[i][j]=='.') {
						if(j<m-1) {
							if(grid[i][j+1]=='.'&&y<=2*x)
								c+=y;
							else if(grid[i][j+1]=='.')
							    c+=(2*x);
							else if(grid[i][j+1]!='.')
								c+=x;
							j++;
						}
						else {
							c+=x;
						}

					}
				}
			}
			System.out.println(c);
		}
	}

	public static void ThreeIndices() {
		int t=sc.nextInt();
		for(int o=0;o<t;o++) {
			int n=sc.nextInt();
			int p[]=new int[n];
			for(int i=0;i<n;i++)
				p[i]=sc.nextInt();
			boolean f=false;
			int a=0;
			for(int i=0;i<n-2&&!f;i++) {
				if(p[i]<p[i+1]&&p[i+2]<p[i+1]) {
					f=true;a=i;
				}
			}
			if(f) {System.out.println("Yes");
			System.out.println((int)(a+1)+" "+(int)(a+2)+" "+(int)(a+3)+" ");
			}

			else System.out.println("No");
		}
	}

	public static void UniversalSolution() {
		int t=sc.nextInt();
		sc.nextLine();
		for(int o=0;o<t;o++) {
			String s=sc.nextLine();
			int Pc=0;
			int Rc=0;
			int Sc=0;
			for(int i=0;i<s.length();i++) {
				if(s.charAt(i)=='R')
					Rc++;
				else if(s.charAt(i)=='P')
					Pc++;
				else
					Sc++;
			}
			int m=Math.max(Pc, Math.max(Rc, Sc));
			for(int i=0;i<s.length();i++) {
				if(m==Pc) {
					out.print('S');
				}
				else if(m==Rc)
					out.print('P');
				else if(m==Sc)
					out.print('R');

			}
			out.println();
			out.flush();
		}
	}

	public static void CreateTheTeams() {
		int t=sc.nextInt();
		for(int o=0;o<t;o++) {
			int n=sc.nextInt();
			int x=sc.nextInt();
			int []a=new int[n];
			for(int i=0;i<n;i++) {
				a[i]=sc.nextInt();
			}
			Arrays.sort(a);
			int c=0;
			int num=1;
			for(int i=n-1;i>=0;i--) {
				if(a[i]*num>=x) {
					c++;
					num=1;
				}
				else {
					num++;
				}
			}
			System.out.println(c);
		}
	}

	public static void BerserkAndFireball() {
		int n=sc.nextInt();
		int m=sc.nextInt();
		int x=sc.nextInt();
		int k=sc.nextInt();
		int y=sc.nextInt();
		int a[]=new int[n];
		int b[]=new int[m];
		for(int i=0;i<n;i++) {
			a[i]=sc.nextInt();
		}

		for(int i=0;i<m;i++) {
			b[i]=sc.nextInt();
		}
		//System.out.println(Arrays.toString(a));
		//System.out.println(Arrays.toString(b));

		long count=0;
		int jl=0;
		int jr=0;
		int jc=0;
		//boolean fin=false;
		//int i=0;
		//if(a[0]==b[0]) {j++;i++;}
		for(int i=0;i<n;) {
			int max=0;
			int c=0;
			//System.out.println(i+"  "+j+"  "+b.length+"  "+a.length +"  "+n);
			while(i<n) {
				//System.out.println(b[jr]+"  "+a[i]+"  "+(boolean)(a[i]==b[jr]));
				if(a[i]==b[jr]) {
					i++;
					//System.out.println("break");
					break;
				}
				//System.out.println(b[jl]+"  "+b[jr]+"  "+a[i]);
				c++;
				int maxtemp=Math.max(b[jl], Math.max(b[jr], a[i]));
				max=Math.max(maxtemp, max);
				//System.out.println(max);
				i++;
			}
			if(max>b[jr]&&max>b[jl]) {
				//System.out.println(max+"  "+i);
				if(c<k) {
					System.out.println(-1);
					return;
				}
				else {
					c-=k;
					count+=x;
					if(y*k<=x) {
						count+=c*y;
					}
					else {
						int d=c/k;
						int mod=c%k;
						count+=(d*x+mod*y);
					}

				}
			}
			else {
				if(y*k<=x) {
					//System.out.println(max);
					count+=c*y;
				}
				else {
					//System.out.println(max+"  "+c+"  "+b[jl]+"   "+b[jr]);
					int d=c/k;
					int mod=c%k;
					count+=(d*x+mod*y);
				}
			}

			if(jr==jl) {
				jr++;
				jc++;
			}
			else {
				jr++;
				jl++;
				jc++;
			}

			if(jr>=m) {
				jr=m-1;
				jl=m-1;

			}

			//System.out.println(b[jl]+"  "+b[jr]);

			//i++;
			//System.out.println(count);

		}
		if(jc<m)System.out.println(-1);
		else
		    System.out.println(count);

	}

	public static void main(String[] args) {
		//BerlandPoker();
		//TheatreSquare();
		//NewTheatreSquare();
		//ThreeIndices();
		//UniversalSolution();
		//CreateTheTeams();
		BerserkAndFireball();

	}

}


import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;

public class Second {
	static Scanner sc =new Scanner(System.in);
	static PrintWriter out=new PrintWriter(System.out);

	public static void BerlandPoker() {
		int t=sc.nextInt();
		for(int o=0;o<t;o++) {
			int n=sc.nextInt();
			int m=sc.nextInt();
			int k=sc.nextInt();
			int numOfCards=n/k;
			if(numOfCards>=m)
				System.out.println(m);
			else if(n==m)
				System.out.println(0);
			else {
				k--;
				m-=numOfCards;
				if(m<=k) {
					System.out.println(numOfCards-1);
				}
				else {
				int d=m/k;
				int mod=m%k;
				if(mod!=0)
			      System.out.println(numOfCards-(d+1));
				else
				  System.out.println(numOfCards-(d));

				}
			}
		}
	}

	public static void TheatreSquare() {
		double n=sc.nextInt();
		double m=sc.nextInt();
		double a=sc.nextInt();
		System.out.println((long)(((long)Math.ceil(n/a))*((long)Math.ceil(m/a))));

	}

	public static void NewTheatreSquare() {
		int t=sc.nextInt();
		for(int o=0;o<t;o++) {
			int n=sc.nextInt();
			int m=sc.nextInt();
			int x=sc.nextInt();
			int y=sc.nextInt();
			sc.nextLine();
			int c=0;
			char[][]grid=new char[n][m];
			for(int i=0;i<n;i++) {
				grid[i]=sc.nextLine().toCharArray();
			}
			for(int i=0;i<n;i++) {
				for(int j=0;j<m;j++) {
					if(grid[i][j]=='.') {
						if(j<m-1) {
							if(grid[i][j+1]=='.'&&y<=2*x)
								c+=y;
							else if(grid[i][j+1]=='.')
							    c+=(2*x);
							else if(grid[i][j+1]!='.')
								c+=x;
							j++;
						}
						else {
							c+=x;
						}

					}
				}
			}
			System.out.println(c);
		}
	}

	public static void ThreeIndices() {
		int t=sc.nextInt();
		for(int o=0;o<t;o++) {
			int n=sc.nextInt();
			int p[]=new int[n];
			for(int i=0;i<n;i++)
				p[i]=sc.nextInt();
			boolean f=false;
			int a=0;
			for(int i=0;i<n-2&&!f;i++) {
				if(p[i]<p[i+1]&&p[i+2]<p[i+1]) {
					f=true;a=i;
				}
			}
			if(f) {System.out.println("Yes");
			System.out.println((int)(a+1)+" "+(int)(a+2)+" "+(int)(a+3)+" ");
			}

			else System.out.println("No");
		}
	}

	public static void UniversalSolution() {
		int t=sc.nextInt();
		sc.nextLine();
		for(int o=0;o<t;o++) {
			String s=sc.nextLine();
			int Pc=0;
			int Rc=0;
			int Sc=0;
			for(int i=0;i<s.length();i++) {
				if(s.charAt(i)=='R')
					Rc++;
				else if(s.charAt(i)=='P')
					Pc++;
				else
					Sc++;
			}
			int m=Math.max(Pc, Math.max(Rc, Sc));
			for(int i=0;i<s.length();i++) {
				if(m==Pc) {
					out.print('S');
				}
				else if(m==Rc)
					out.print('P');
				else if(m==Sc)
					out.print('R');

			}
			out.println();
			out.flush();
		}
	}

	public static void CreateTheTeams() {
		int t=sc.nextInt();
		for(int o=0;o<t;o++) {
			int n=sc.nextInt();
			int x=sc.nextInt();
			int []a=new int[n];
			for(int i=0;i<n;i++) {
				a[i]=sc.nextInt();
			}
			Arrays.sort(a);
			int c=0;
			int num=1;
			for(int i=n-1;i>=0;i--) {
				if(a[i]*num>=x) {
					c++;
					num=1;
				}
				else {
					num++;
				}
			}
			System.out.println(c);
		}
	}

	public static void BerserkAndFireball() {
		int n=sc.nextInt();
		int m=sc.nextInt();
		int x=sc.nextInt();
		int k=sc.nextInt();
		int y=sc.nextInt();
		int a[]=new int[n];
		int b[]=new int[m];
		int maxA=0;
		int maxB=0;
		for(int i=0;i<n;i++) {
			a[i]=sc.nextInt();
			if(a[i]>maxA)maxA=a[i];
		}

		for(int i=0;i<m;i++) {
			b[i]=sc.nextInt();
			if(b[i]>maxB)maxB=b[i];
		}
		//System.out.println(Arrays.toString(a));
		//System.out.println(Arrays.toString(b));

		int count=0;
		int j=0;
		int i=0;
		if(a[0]==b[0]) {j++;i++;}
		for( i=i;i<n;) {

			int max=0;
			int c=0;
			//System.out.println(i+"  "+j+"  "+b.length+"  "+a.length +"  "+n);
			while(i<n) {
				if(j<m&&a[i]==b[j]) {
				//	System.out.println(i+"  "+j);

					i++;
					j++;
					break;
				}
				System.out.println("aaa");
				c++;
				if(a[i]>maxB)max++;
				i++;
			}

			//System.out.println(max+"   "+c);
			int d=c/k;
			int mod=c%k;

			if(y*c>=(d*x+mod*y)) {
				max-=d*k;
				count+=d*x;
				if(max>0) {
					System.out.println(-1);
					return;
				}
				count+=mod*y;

			}
			else if(max>0) {
					//c-=(k);
					int u=(int)Math.ceil(max/k);
					c-=(k*u);
					count+=u*x;
					if(c<0) {
						System.out.println(-1);
						return;
					}
					count+=c*y;
			}
			else {
				count+=c*y;
			}
		}
		if(j<m)System.out.println(-1+" "+j);
		else
		    System.out.println(count);

	}

	public static void main(String[] args) {
		//BerlandPoker();
		//TheatreSquare();
		//NewTheatreSquare();
		//ThreeIndices();
		//UniversalSolution();
		//CreateTheTeams();
		BerserkAndFireball();

	}

}


import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;

public class Second {
	static Scanner sc =new Scanner(System.in);
	static PrintWriter out=new PrintWriter(System.out);

	public static void BerlandPoker() {
		int t=sc.nextInt();
		for(int o=0;o<t;o++) {
			int n=sc.nextInt();
			int m=sc.nextInt();
			int k=sc.nextInt();
			int numOfCards=n/k;
			if(numOfCards>=m)
				System.out.println(m);
			else if(n==m)
				System.out.println(0);
			else {
				k--;
				m-=numOfCards;
				if(m<=k) {
					System.out.println(numOfCards-1);
				}
				else {
				int d=m/k;
				int mod=m%k;
				if(mod!=0)
			      System.out.println(numOfCards-(d+1));
				else
				  System.out.println(numOfCards-(d));

				}
			}
		}
	}

	public static void TheatreSquare() {
		double n=sc.nextInt();
		double m=sc.nextInt();
		double a=sc.nextInt();
		System.out.println((long)(((long)Math.ceil(n/a))*((long)Math.ceil(m/a))));

	}

	public static void NewTheatreSquare() {
		int t=sc.nextInt();
		for(int o=0;o<t;o++) {
			int n=sc.nextInt();
			int m=sc.nextInt();
			int x=sc.nextInt();
			int y=sc.nextInt();
			sc.nextLine();
			int c=0;
			char[][]grid=new char[n][m];
			for(int i=0;i<n;i++) {
				grid[i]=sc.nextLine().toCharArray();
			}
			for(int i=0;i<n;i++) {
				for(int j=0;j<m;j++) {
					if(grid[i][j]=='.') {
						if(j<m-1) {
							if(grid[i][j+1]=='.'&&y<=2*x)
								c+=y;
							else if(grid[i][j+1]=='.')
							    c+=(2*x);
							else if(grid[i][j+1]!='.')
								c+=x;
							j++;
						}
						else {
							c+=x;
						}

					}
				}
			}
			System.out.println(c);
		}
	}

	public static void ThreeIndices() {
		int t=sc.nextInt();
		for(int o=0;o<t;o++) {
			int n=sc.nextInt();
			int p[]=new int[n];
			for(int i=0;i<n;i++)
				p[i]=sc.nextInt();
			boolean f=false;
			int a=0;
			for(int i=0;i<n-2&&!f;i++) {
				if(p[i]<p[i+1]&&p[i+2]<p[i+1]) {
					f=true;a=i;
				}
			}
			if(f) {System.out.println("Yes");
			System.out.println((int)(a+1)+" "+(int)(a+2)+" "+(int)(a+3)+" ");
			}

			else System.out.println("No");
		}
	}

	public static void UniversalSolution() {
		int t=sc.nextInt();
		sc.nextLine();
		for(int o=0;o<t;o++) {
			String s=sc.nextLine();
			int Pc=0;
			int Rc=0;
			int Sc=0;
			for(int i=0;i<s.length();i++) {
				if(s.charAt(i)=='R')
					Rc++;
				else if(s.charAt(i)=='P')
					Pc++;
				else
					Sc++;
			}
			int m=Math.max(Pc, Math.max(Rc, Sc));
			for(int i=0;i<s.length();i++) {
				if(m==Pc) {
					out.print('S');
				}
				else if(m==Rc)
					out.print('P');
				else if(m==Sc)
					out.print('R');

			}
			out.println();
			out.flush();
		}
	}

	public static void CreateTheTeams() {
		int t=sc.nextInt();
		for(int o=0;o<t;o++) {
			int n=sc.nextInt();
			int x=sc.nextInt();
			int []a=new int[n];
			for(int i=0;i<n;i++) {
				a[i]=sc.nextInt();
			}
			Arrays.sort(a);
			int c=0;
			int num=1;
			for(int i=n-1;i>=0;i--) {
				if(a[i]*num>=x) {
					c++;
					num=1;
				}
				else {
					num++;
				}
			}
			System.out.println(c);
		}
	}

	public static void BerserkAndFireball() {
		int n=sc.nextInt();
		int m=sc.nextInt();
		long x=sc.nextLong();
		long k=sc.nextLong();
		long y=sc.nextLong();
		long a[]=new long[n];
		long b[]=new long[m];
		for(int i=0;i<n;i++) {
			a[i]=sc.nextInt();
		}

		for(int i=0;i<m;i++) {
			b[i]=sc.nextInt();
		}
		//System.out.println(Arrays.toString(a));
		//System.out.println(Arrays.toString(b));

		long count=0;
		int jl=0;
		int jr=0;
		int jc=0;
		//boolean fin=false;
		//int i=0;
		//if(a[0]==b[0]) {j++;i++;}
		for(int i=0;i<n;) {
			long max=0;
			long c=0;
			//System.out.println(i+"  "+j+"  "+b.length+"  "+a.length +"  "+n);
			while(i<n) {
				//System.out.println(b[jr]+"  "+a[i]+"  "+(boolean)(a[i]==b[jr]));
				if(a[i]==b[jr]) {
					i++;
					//System.out.println("break");
					break;
				}
				//System.out.println(b[jl]+"  "+b[jr]+"  "+a[i]);
				c++;
				long maxtemp=(long)Math.max(b[jl], Math.max(b[jr], a[i]));
				max=Math.max(maxtemp, max);
				//System.out.println(max);
				i++;
			}
			if(max>b[jr]&&max>b[jl]) {
				//System.out.println(max+"  "+i);
				if(c<k) {
					System.out.println(-1);
					return;
				}
				else {
					c-=k;
					count+=x;
					if(y*k<=x) {
						count+=c*y;
					}
					else {
						long d=c/k;
						long mod=c%k;
						count+=(d*x+mod*y);
					}

				}
			}
			else {
				if(y*k<=x) {
					//System.out.println(max);
					count+=c*y;
				}
				else {
					//System.out.println(max+"  "+c+"  "+b[jl]+"   "+b[jr]);
					long d=c/k;
					long mod=c%k;
					count+=(d*x+mod*y);
				}
			}

			if(jr==jl) {
				jr++;
				jc++;
			}
			else {
				jr++;
				jl++;
				jc++;
			}

			if(jr>=m) {
				jr=m-1;
				jl=m-1;

			}

			//System.out.println(b[jl]+"  "+b[jr]);

			//i++;
			//System.out.println(count);

		}
		if(jc<m)System.out.println(-1);
		else
		    System.out.println(count);

	}

	public static void main(String[] args) {
		//BerlandPoker();
		//TheatreSquare();
		//NewTheatreSquare();
		//ThreeIndices();
		//UniversalSolution();
		//CreateTheTeams();
		BerserkAndFireball();

	}

}


import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;

public class Second {
	static Scanner sc =new Scanner(System.in);
	static PrintWriter out=new PrintWriter(System.out);

	public static void BerlandPoker() {
		int t=sc.nextInt();
		for(int o=0;o<t;o++) {
			int n=sc.nextInt();
			int m=sc.nextInt();
			int k=sc.nextInt();
			int numOfCards=n/k;
			if(numOfCards>=m)
				System.out.println(m);
			else if(n==m)
				System.out.println(0);
			else {
				k--;
				m-=numOfCards;
				if(m<=k) {
					System.out.println(numOfCards-1);
				}
				else {
				int d=m/k;
				int mod=m%k;
				if(mod!=0)
			      System.out.println(numOfCards-(d+1));
				else
				  System.out.println(numOfCards-(d));

				}
			}
		}
	}

	public static void TheatreSquare() {
		double n=sc.nextInt();
		double m=sc.nextInt();
		double a=sc.nextInt();
		System.out.println((long)(((long)Math.ceil(n/a))*((long)Math.ceil(m/a))));

	}

	public static void NewTheatreSquare() {
		int t=sc.nextInt();
		for(int o=0;o<t;o++) {
			int n=sc.nextInt();
			int m=sc.nextInt();
			int x=sc.nextInt();
			int y=sc.nextInt();
			sc.nextLine();
			int c=0;
			char[][]grid=new char[n][m];
			for(int i=0;i<n;i++) {
				grid[i]=sc.nextLine().toCharArray();
			}
			for(int i=0;i<n;i++) {
				for(int j=0;j<m;j++) {
					if(grid[i][j]=='.') {
						if(j<m-1) {
							if(grid[i][j+1]=='.'&&y<=2*x)
								c+=y;
							else if(grid[i][j+1]=='.')
							    c+=(2*x);
							else if(grid[i][j+1]!='.')
								c+=x;
							j++;
						}
						else {
							c+=x;
						}

					}
				}
			}
			System.out.println(c);
		}
	}

	public static void ThreeIndices() {
		int t=sc.nextInt();
		for(int o=0;o<t;o++) {
			int n=sc.nextInt();
			int p[]=new int[n];
			for(int i=0;i<n;i++)
				p[i]=sc.nextInt();
			boolean f=false;
			int a=0;
			for(int i=0;i<n-2&&!f;i++) {
				if(p[i]<p[i+1]&&p[i+2]<p[i+1]) {
					f=true;a=i;
				}
			}
			if(f) {System.out.println("Yes");
			System.out.println((int)(a+1)+" "+(int)(a+2)+" "+(int)(a+3)+" ");
			}

			else System.out.println("No");
		}
	}

	public static void UniversalSolution() {
		int t=sc.nextInt();
		sc.nextLine();
		for(int o=0;o<t;o++) {
			String s=sc.nextLine();
			int Pc=0;
			int Rc=0;
			int Sc=0;
			for(int i=0;i<s.length();i++) {
				if(s.charAt(i)=='R')
					Rc++;
				else if(s.charAt(i)=='P')
					Pc++;
				else
					Sc++;
			}
			int m=Math.max(Pc, Math.max(Rc, Sc));
			for(int i=0;i<s.length();i++) {
				if(m==Pc) {
					out.print('S');
				}
				else if(m==Rc)
					out.print('P');
				else if(m==Sc)
					out.print('R');

			}
			out.println();
			out.flush();
		}
	}

	public static void CreateTheTeams() {
		int t=sc.nextInt();
		for(int o=0;o<t;o++) {
			int n=sc.nextInt();
			int x=sc.nextInt();
			int []a=new int[n];
			for(int i=0;i<n;i++) {
				a[i]=sc.nextInt();
			}
			Arrays.sort(a);
			int c=0;
			int num=1;
			for(int i=n-1;i>=0;i--) {
				if(a[i]*num>=x) {
					c++;
					num=1;
				}
				else {
					num++;
				}
			}
			System.out.println(c);
		}
	}

	public static void BerserkAndFireball() {
		int n=sc.nextInt();
		int m=sc.nextInt();
		int x=sc.nextInt();
		int k=sc.nextInt();
		int y=sc.nextInt();
		int a[]=new int[n];
		int b[]=new int[m];
		for(int i=0;i<n;i++) {
			a[i]=sc.nextInt();
		}

		for(int i=0;i<m;i++) {
			b[i]=sc.nextInt();
		}
		//System.out.println(Arrays.toString(a));
		//System.out.println(Arrays.toString(b));

		int count=0;
		int jl=0;
		int jr=0;
		int jc=0;
		//boolean fin=false;
		//int i=0;
		//if(a[0]==b[0]) {j++;i++;}
		for(int i=0;i<n;) {
			int max=0;
			int c=0;
			//System.out.println(i+"  "+j+"  "+b.length+"  "+a.length +"  "+n);
			while(i<n) {
				//System.out.println(b[jr]+"  "+a[i]+"  "+(boolean)(a[i]==b[jr]));
				if(a[i]==b[jr]) {
					i++;
					//System.out.println("break");
					break;
				}
				//System.out.println(b[jl]+"  "+b[jr]+"  "+a[i]);
				c++;
				int maxtemp=Math.max(b[jl], Math.max(b[jr], a[i]));
				max=Math.max(maxtemp, max);
				//System.out.println(max);
				i++;
			}
			if(max>b[jr]&&max>b[jl]) {
				//System.out.println(max+"  "+i);
				if(c<k) {
					System.out.println(-1);
					return;
				}
				else {
					c-=k;
					count+=x;
					if(y*k<=x) {
						count+=c*y;
					}
					else {
						int d=c/k;
						int mod=c%k;
						count+=(d*x+mod*y);
					}

				}
			}
			else {
				if(y*k<=x) {
					//System.out.println(max);
					count+=c*y;
				}
				else {
					//System.out.println(max+"  "+c+"  "+b[jl]+"   "+b[jr]);
					int d=c/k;
					int mod=c%k;
					count+=(d*x+mod*y);
				}
			}

			if(jr==jl) {
				jr++;
				jc++;
			}
			else {
				jr++;
				jl++;
				jc++;
			}

			if(jr>=m) {
				jr=m-1;
				jl=m-1;

			}

			//System.out.println(b[jl]+"  "+b[jr]);

			//i++;
			//System.out.println(count);

		}
		if(jc<m)System.out.println(-1);
		else
		    System.out.println(count);

	}

	public static void main(String[] args) {
		//BerlandPoker();
		//TheatreSquare();
		//NewTheatreSquare();
		//ThreeIndices();
		//UniversalSolution();
		//CreateTheTeams();
		BerserkAndFireball();

	}

}


import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;

public class Second {
	static Scanner sc =new Scanner(System.in);
	static PrintWriter out=new PrintWriter(System.out);

	public static void BerlandPoker() {
		int t=sc.nextInt();
		for(int o=0;o<t;o++) {
			int n=sc.nextInt();
			int m=sc.nextInt();
			int k=sc.nextInt();
			int numOfCards=n/k;
			if(numOfCards>=m)
				System.out.println(m);
			else if(n==m)
				System.out.println(0);
			else {
				k--;
				m-=numOfCards;
				if(m<=k) {
					System.out.println(numOfCards-1);
				}
				else {
				int d=m/k;
				int mod=m%k;
				if(mod!=0)
			      System.out.println(numOfCards-(d+1));
				else
				  System.out.println(numOfCards-(d));

				}
			}
		}
	}

	public static void TheatreSquare() {
		double n=sc.nextInt();
		double m=sc.nextInt();
		double a=sc.nextInt();
		System.out.println((long)(((long)Math.ceil(n/a))*((long)Math.ceil(m/a))));

	}

	public static void NewTheatreSquare() {
		int t=sc.nextInt();
		for(int o=0;o<t;o++) {
			int n=sc.nextInt();
			int m=sc.nextInt();
			int x=sc.nextInt();
			int y=sc.nextInt();
			sc.nextLine();
			int c=0;
			char[][]grid=new char[n][m];
			for(int i=0;i<n;i++) {
				grid[i]=sc.nextLine().toCharArray();
			}
			for(int i=0;i<n;i++) {
				for(int j=0;j<m;j++) {
					if(grid[i][j]=='.') {
						if(j<m-1) {
							if(grid[i][j+1]=='.'&&y<=2*x)
								c+=y;
							else if(grid[i][j+1]=='.')
							    c+=(2*x);
							else if(grid[i][j+1]!='.')
								c+=x;
							j++;
						}
						else {
							c+=x;
						}

					}
				}
			}
			System.out.println(c);
		}
	}

	public static void ThreeIndices() {
		int t=sc.nextInt();
		for(int o=0;o<t;o++) {
			int n=sc.nextInt();
			int p[]=new int[n];
			for(int i=0;i<n;i++)
				p[i]=sc.nextInt();
			boolean f=false;
			int a=0;
			for(int i=0;i<n-2&&!f;i++) {
				if(p[i]<p[i+1]&&p[i+2]<p[i+1]) {
					f=true;a=i;
				}
			}
			if(f) {System.out.println("Yes");
			System.out.println((int)(a+1)+" "+(int)(a+2)+" "+(int)(a+3)+" ");
			}

			else System.out.println("No");
		}
	}

	public static void UniversalSolution() {
		int t=sc.nextInt();
		sc.nextLine();
		for(int o=0;o<t;o++) {
			String s=sc.nextLine();
			int Pc=0;
			int Rc=0;
			int Sc=0;
			for(int i=0;i<s.length();i++) {
				if(s.charAt(i)=='R')
					Rc++;
				else if(s.charAt(i)=='P')
					Pc++;
				else
					Sc++;
			}
			int m=Math.max(Pc, Math.max(Rc, Sc));
			for(int i=0;i<s.length();i++) {
				if(m==Pc) {
					out.print('S');
				}
				else if(m==Rc)
					out.print('P');
				else if(m==Sc)
					out.print('R');

			}
			out.println();
			out.flush();
		}
	}

	public static void CreateTheTeams() {
		int t=sc.nextInt();
		for(int o=0;o<t;o++) {
			int n=sc.nextInt();
			int x=sc.nextInt();
			int []a=new int[n];
			for(int i=0;i<n;i++) {
				a[i]=sc.nextInt();
			}
			Arrays.sort(a);
			int c=0;
			int num=1;
			for(int i=n-1;i>=0;i--) {
				if(a[i]*num>=x) {
					c++;
					num=1;
				}
				else {
					num++;
				}
			}
			System.out.println(c);
		}
	}

	public static void BerserkAndFireball() {
		int n=sc.nextInt();
		int m=sc.nextInt();
		int x=sc.nextInt();
		int k=sc.nextInt();
		int y=sc.nextInt();
		int a[]=new int[n];
		int b[]=new int[m];
		int maxA=0;
		int maxB=0;
		for(int i=0;i<n;i++) {
			a[i]=sc.nextInt();
			if(a[i]>maxA)maxA=a[i];
		}

		for(int i=0;i<m;i++) {
			b[i]=sc.nextInt();
			if(b[i]>maxB)maxB=b[i];
		}
		//System.out.println(Arrays.toString(a));
		//System.out.println(Arrays.toString(b));

		int count=0;
		int j=0;
		int i=0;
		if(a[0]==b[0]) {j++;i++;}
		for( i=i;i<n;) {

			int max=0;
			int c=0;
			//System.out.println(i+"  "+j+"  "+b.length+"  "+a.length +"  "+n);
			while(i<n) {
				if(j<m&&a[i]==b[j]) {
				//	System.out.println(i+"  "+j);

					i++;
					j++;
					break;
				}
				//System.out.println("aaa");
				c++;
				if(a[i]>maxB)max++;
				i++;
			}

			//System.out.println(max+"   "+c);
			int d=c/k;
			int mod=c%k;

			if(y*c>=(d*x+mod*y)) {
				max-=d*k;
				count+=d*x;
				if(max>0) {
					System.out.println(-1);
					return;
				}
				count+=mod*y;

			}
			else if(max>0) {
					//c-=(k);
					int u=(int)Math.ceil(max/k);
					c-=(k*u);
					count+=u*x;
					if(c<0) {
						System.out.println(-1);
						return;
					}
					count+=c*y;
			}
			else {
				count+=c*y;
			}
		}
		if(j<m)System.out.println(-1+" "+j);
		else
		    System.out.println(count);

	}

	public static void main(String[] args) {
		//BerlandPoker();
		//TheatreSquare();
		//NewTheatreSquare();
		//ThreeIndices();
		//UniversalSolution();
		//CreateTheTeams();
		BerserkAndFireball();

	}

}


import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;

public class Second {
	static Scanner sc =new Scanner(System.in);
	static PrintWriter out=new PrintWriter(System.out);

	public static void BerlandPoker() {
		int t=sc.nextInt();
		for(int o=0;o<t;o++) {
			int n=sc.nextInt();
			int m=sc.nextInt();
			int k=sc.nextInt();
			int numOfCards=n/k;
			if(numOfCards>=m)
				System.out.println(m);
			else if(n==m)
				System.out.println(0);
			else {
				k--;
				m-=numOfCards;
				if(m<=k) {
					System.out.println(numOfCards-1);
				}
				else {
				int d=m/k;
				int mod=m%k;
				if(mod!=0)
			      System.out.println(numOfCards-(d+1));
				else
				  System.out.println(numOfCards-(d));

				}
			}
		}
	}

	public static void TheatreSquare() {
		double n=sc.nextInt();
		double m=sc.nextInt();
		double a=sc.nextInt();
		System.out.println((long)(((long)Math.ceil(n/a))*((long)Math.ceil(m/a))));

	}

	public static void NewTheatreSquare() {
		int t=sc.nextInt();
		for(int o=0;o<t;o++) {
			int n=sc.nextInt();
			int m=sc.nextInt();
			int x=sc.nextInt();
			int y=sc.nextInt();
			sc.nextLine();
			int c=0;
			char[][]grid=new char[n][m];
			for(int i=0;i<n;i++) {
				grid[i]=sc.nextLine().toCharArray();
			}
			for(int i=0;i<n;i++) {
				for(int j=0;j<m;j++) {
					if(grid[i][j]=='.') {
						if(j<m-1) {
							if(grid[i][j+1]=='.'&&y<=2*x)
								c+=y;
							else if(grid[i][j+1]=='.')
							    c+=(2*x);
							else if(grid[i][j+1]!='.')
								c+=x;
							j++;
						}
						else {
							c+=x;
						}

					}
				}
			}
			System.out.println(c);
		}
	}

	public static void ThreeIndices() {
		int t=sc.nextInt();
		for(int o=0;o<t;o++) {
			int n=sc.nextInt();
			int p[]=new int[n];
			for(int i=0;i<n;i++)
				p[i]=sc.nextInt();
			boolean f=false;
			int a=0;
			for(int i=0;i<n-2&&!f;i++) {
				if(p[i]<p[i+1]&&p[i+2]<p[i+1]) {
					f=true;a=i;
				}
			}
			if(f) {System.out.println("Yes");
			System.out.println((int)(a+1)+" "+(int)(a+2)+" "+(int)(a+3)+" ");
			}

			else System.out.println("No");
		}
	}

	public static void UniversalSolution() {
		int t=sc.nextInt();
		sc.nextLine();
		for(int o=0;o<t;o++) {
			String s=sc.nextLine();
			int Pc=0;
			int Rc=0;
			int Sc=0;
			for(int i=0;i<s.length();i++) {
				if(s.charAt(i)=='R')
					Rc++;
				else if(s.charAt(i)=='P')
					Pc++;
				else
					Sc++;
			}
			int m=Math.max(Pc, Math.max(Rc, Sc));
			for(int i=0;i<s.length();i++) {
				if(m==Pc) {
					out.print('S');
				}
				else if(m==Rc)
					out.print('P');
				else if(m==Sc)
					out.print('R');

			}
			out.println();
			out.flush();
		}
	}

	public static void CreateTheTeams() {
		int t=sc.nextInt();
		for(int o=0;o<t;o++) {
			int n=sc.nextInt();
			int x=sc.nextInt();
			int []a=new int[n];
			for(int i=0;i<n;i++) {
				a[i]=sc.nextInt();
			}
			Arrays.sort(a);
			int c=0;
			int num=1;
			for(int i=n-1;i>=0;i--) {
				if(a[i]*num>=x) {
					c++;
					num=1;
				}
				else {
					num++;
				}
			}
			System.out.println(c);
		}
	}

	public static void BerserkAndFireball() {
		int n=sc.nextInt();
		int m=sc.nextInt();
		int x=sc.nextInt();
		int k=sc.nextInt();
		int y=sc.nextInt();
		int a[]=new int[n];
		int b[]=new int[m];
		int maxA=0;
		int maxB=0;
		for(int i=0;i<n;i++) {
			a[i]=sc.nextInt();
			if(a[i]>maxA)maxA=a[i];
		}

		for(int i=0;i<m;i++) {
			b[i]=sc.nextInt();
			if(b[i]>maxB)maxB=b[i];
		}
		//System.out.println(Arrays.toString(a));
		//System.out.println(Arrays.toString(b));

		int count=0;
		int j=0;
		int i=0;
		if(a[0]==b[0]) {j++;i++;}
		for( i=i;i<n;) {

			int max=0;
			int c=0;
			//System.out.println(i+"  "+j+"  "+b.length+"  "+a.length +"  "+n);
			while(i<n) {
				if(j<m&&a[i]==b[j]) {
				//	System.out.println(i+"  "+j);

					i++;
					j++;
					break;
				}
				//System.out.println("aaa");
				c++;
				if(a[i]>maxB)max++;
				i++;
			}

			//System.out.println(max+"   "+c);
			int d=c/k;
			int mod=c%k;

			if(y*c>=(d*x+mod*y)) {
				max-=d*k;
				count+=d*x;
				if(max>0) {
					System.out.println(-1);
					return;
				}
				count+=mod*y;

			}
			else if(max>0) {
					//c-=(k);
					int u=(int)Math.ceil(max/k);
					c-=(k*u);
					count+=u*x;
					if(c<0) {
						System.out.println(-1);
						return;
					}
					count+=c*y;
			}
			else {
				count+=c*y;
			}
		}
		if(j<m)System.out.println(-1);
		else
		    System.out.println(count);

	}

	public static void main(String[] args) {
		//BerlandPoker();
		//TheatreSquare();
		//NewTheatreSquare();
		//ThreeIndices();
		//UniversalSolution();
		//CreateTheTeams();
		BerserkAndFireball();

	}

}


import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;

public class Second {
	static Scanner sc =new Scanner(System.in);
	static PrintWriter out=new PrintWriter(System.out);

	public static void BerlandPoker() {
		int t=sc.nextInt();
		for(int o=0;o<t;o++) {
			int n=sc.nextInt();
			int m=sc.nextInt();
			int k=sc.nextInt();
			int numOfCards=n/k;
			if(numOfCards>=m)
				System.out.println(m);
			else if(n==m)
				System.out.println(0);
			else {
				k--;
				m-=numOfCards;
				if(m<=k) {
					System.out.println(numOfCards-1);
				}
				else {
				int d=m/k;
				int mod=m%k;
				if(mod!=0)
			      System.out.println(numOfCards-(d+1));
				else
				  System.out.println(numOfCards-(d));

				}
			}
		}
	}

	public static void TheatreSquare() {
		double n=sc.nextInt();
		double m=sc.nextInt();
		double a=sc.nextInt();
		System.out.println((long)(((long)Math.ceil(n/a))*((long)Math.ceil(m/a))));

	}

	public static void NewTheatreSquare() {
		int t=sc.nextInt();
		for(int o=0;o<t;o++) {
			int n=sc.nextInt();
			int m=sc.nextInt();
			int x=sc.nextInt();
			int y=sc.nextInt();
			sc.nextLine();
			int c=0;
			char[][]grid=new char[n][m];
			for(int i=0;i<n;i++) {
				grid[i]=sc.nextLine().toCharArray();
			}
			for(int i=0;i<n;i++) {
				for(int j=0;j<m;j++) {
					if(grid[i][j]=='.') {
						if(j<m-1) {
							if(grid[i][j+1]=='.'&&y<=2*x)
								c+=y;
							else if(grid[i][j+1]=='.')
							    c+=(2*x);
							else if(grid[i][j+1]!='.')
								c+=x;
							j++;
						}
						else {
							c+=x;
						}

					}
				}
			}
			System.out.println(c);
		}
	}

	public static void ThreeIndices() {
		int t=sc.nextInt();
		for(int o=0;o<t;o++) {
			int n=sc.nextInt();
			int p[]=new int[n];
			for(int i=0;i<n;i++)
				p[i]=sc.nextInt();
			boolean f=false;
			int a=0;
			for(int i=0;i<n-2&&!f;i++) {
				if(p[i]<p[i+1]&&p[i+2]<p[i+1]) {
					f=true;a=i;
				}
			}
			if(f) {System.out.println("Yes");
			System.out.println((int)(a+1)+" "+(int)(a+2)+" "+(int)(a+3)+" ");
			}

			else System.out.println("No");
		}
	}

	public static void UniversalSolution() {
		int t=sc.nextInt();
		sc.nextLine();
		for(int o=0;o<t;o++) {
			String s=sc.nextLine();
			int Pc=0;
			int Rc=0;
			int Sc=0;
			for(int i=0;i<s.length();i++) {
				if(s.charAt(i)=='R')
					Rc++;
				else if(s.charAt(i)=='P')
					Pc++;
				else
					Sc++;
			}
			int m=Math.max(Pc, Math.max(Rc, Sc));
			for(int i=0;i<s.length();i++) {
				if(m==Pc) {
					out.print('S');
				}
				else if(m==Rc)
					out.print('P');
				else if(m==Sc)
					out.print('R');

			}
			out.println();
			out.flush();
		}
	}

	public static void CreateTheTeams() {
		int t=sc.nextInt();
		for(int o=0;o<t;o++) {
			int n=sc.nextInt();
			int x=sc.nextInt();
			int []a=new int[n];
			for(int i=0;i<n;i++) {
				a[i]=sc.nextInt();
			}
			Arrays.sort(a);
			int c=0;
			int num=1;
			for(int i=n-1;i>=0;i--) {
				if(a[i]*num>=x) {
					c++;
					num=1;
				}
				else {
					num++;
				}
			}
			System.out.println(c);
		}
	}

	public static void BerserkAndFireball() {
		int n=sc.nextInt();
		int m=sc.nextInt();
		int x=sc.nextInt();
		int k=sc.nextInt();
		int y=sc.nextInt();
		int a[]=new int[n];
		int b[]=new int[m];
		for(int i=0;i<n;i++) {
			a[i]=sc.nextInt();
		}

		for(int i=0;i<m;i++) {
			b[i]=sc.nextInt();
		}
		//System.out.println(Arrays.toString(a));
		//System.out.println(Arrays.toString(b));

		int count=0;
		int jl=0;
		int jr=0;
		int jc=0;
		//boolean fin=false;
		//int i=0;
		//if(a[0]==b[0]) {j++;i++;}
		for(int i=0;i<n;) {
			int max=0;
			int c=0;
			//System.out.println(i+"  "+j+"  "+b.length+"  "+a.length +"  "+n);
			while(i<n) {
				//System.out.println(b[jr]+"  "+a[i]+"  "+(boolean)(a[i]==b[jr]));
				if(a[i]==b[jr]) {
					i++;
					//System.out.println("break");
					break;
				}
				//System.out.println(b[jl]+"  "+b[jr]+"  "+a[i]);
				c++;
				int maxtemp=Math.max(b[jl], Math.max(b[jr], a[i]));
				max=Math.max(maxtemp, max);
				//System.out.println(max);
				i++;
			}
			if(max>b[jr]&&max>b[jl]) {
				//System.out.println(max+"  "+i);
				if(c<k) {
					System.out.println(-1);
					return;
				}
				else {
					c-=k;
					count+=x;
					if(y*k<=x) {
						count+=c*y;
					}
					else {
						int d=c/k;
						int mod=c/k;
						count+=(d*x+mod*y);
					}

				}
			}
			else {
				if(y*k<=x) {
					//System.out.println(max);
					count+=c*y;
				}
				else {
					int d=c/k;
					int mod=c/k;
					count+=(d*x+mod*y);
				}

			}

			if(jr==jl) {
				jr++;
				jc++;
			}
			else {
				jr++;
				jl++;
				jc++;
			}

			if(jr>=m) {
				jr=m-1;
				jl=m-1;

			}

			//System.out.println(b[jl]+"  "+b[jr]);

			//i++;

		}
		if(jc<m)System.out.println(-1);
		else
		    System.out.println(count);

	}

	public static void main(String[] args) {
		//BerlandPoker();
		//TheatreSquare();
		//NewTheatreSquare();
		//ThreeIndices();
		//UniversalSolution();
		//CreateTheTeams();
		BerserkAndFireball();

	}

}


import java.util.ArrayList;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.Random;
import java.io.FileWriter;
import java.io.PrintWriter;
/*
    Solution Created: 19:40:49 12/07/2020
    Custom Competitive programming helper.
*/

public class Main {
	static int n, m, fireballCost, fireballLen, berserkCost;
	static boolean worthToRemoveOneByOne = false;
	public static void solve(Reader in, Writer out) {
		n = in.nextInt();
		m = in.nextInt();
		fireballCost =in.nextInt();
		fireballLen = in.nextInt();
		berserkCost = in.nextInt();
		int[] a = in.na(n), b = in.na(m);
		if(fireballCost>=fireballLen*berserkCost) worthToRemoveOneByOne = true;
		int[] pos = new int[n+1];
		Arrays.fill(pos, -1);
		for(int i = 0; i<n; i++) pos[a[i]] = i;
		if(pos[b[0]]==-1 || pos[b[m-1]]==-1) exitFalse();
		ArrayList<Integer> values = new ArrayList<Integer>();
		for(int i = 0; i!=pos[b[0]]; i++) values.add(a[i]);
		long ans = 0;
		int cost = rangeCost(Integer.MIN_VALUE, b[0], values);
		if(cost == -1) exitFalse();
		ans+= cost;

		values.clear();
		for(int i = n-1; i!=pos[b[m-1]]; i--) values.add(a[i]);
		cost = rangeCost(b[m-1], Integer.MIN_VALUE, values);
		if(cost == -1) exitFalse();
		ans+= cost;
		for(int i = 0; i<m-1; i++) {
			int l = b[i], r = b[i+1];
			if(pos[l]>pos[r]) exitFalse();
			values.clear();
			for(int j = pos[l]+1; j<pos[r]; j++) values.add(a[j]);
			cost = rangeCost(b[i], b[i+1], values);
			if(cost == -1) exitFalse();
			ans+= cost;
		}
		out.println(ans);
	}
	public static void exitFalse() {
		System.out.println(-1);
		System.exit(0);
	}
	public static int rangeCost(int lBorder, int rBorder, ArrayList<Integer> a) {
		int l = 0, r = a.size()-1;
		while(l<a.size() && a.get(l)<lBorder) l++;
		while(r>=0 && a.get(r)<rBorder) r--;
		if(l>r) {
			if(worthToRemoveOneByOne) return a.size()*berserkCost;
			int parts = a.size()/fireballLen;
			return parts*fireballCost + (a.size()-parts*fireballLen)*berserkCost;
		}
		int minFireball = r-l+1;
		int maxBerzerk = a.size()-minFireball;
		if(!worthToRemoveOneByOne) {
			int parts = a.size()/fireballLen;
			int leftBerzerk = a.size()-parts*fireballLen;
			if(leftBerzerk>maxBerzerk) return -1;
			return parts*fireballCost + leftBerzerk*berserkCost;
		}
		while((r-l+1)%fireballLen!=0) {
			if(l==0&&r==a.size()-1) return -1;
			if(l>0) l--;
			else if(r>0) r--;
		}
		int fireballs = (r-l+1)/fireballLen;
		int berzerks = a.size()-(r-l+1);
		return fireballs*fireballCost + berzerks*berserkCost;
	}
	public static void main(String[] args) {
		Reader in = new Reader();
		Writer out = new Writer();
		solve(in, out);
		out.exit();
	}

static class Reader {
	static BufferedReader br;
	static StringTokenizer st;
	private int charIdx = 0;
	private String s;

	public Reader() {
		this.br = new BufferedReader(new InputStreamReader(System.in));
	}

	public Reader(String f){
		try {
			this.br = new BufferedReader(new FileReader(f));
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	public int[] na(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = nextInt();
		return a;
	}

	public double[] nd(int n) {
		double[] a = new double[n];
		for (int i = 0; i < n; i++)
			a[i] = nextDouble();
		return a;
	}

	public char nextChar() {
		if (s == null || charIdx >= s.length()) {
			if (st == null || !st.hasMoreTokens())
				try {
					readLine();
				} catch (Exception e) {
				}
			s = st.nextToken();
			charIdx = 0;
		}
		return s.charAt(charIdx++);
	}

	public long[] nl(int n) {
		long[] a = new long[n];
		for (int i = 0; i < n; i++)
			a[i] = nextLong();
		return a;
	}

	public char[] nca() {
		return next().toCharArray();
	}

	public String[] nS(int n) {
		String[] a = new String[n];
		for (int i = 0; i < n; i++)
			a[i] = next();
		return a;
	}

	public int nextInt() {
		if (st == null || !st.hasMoreTokens())
			try {
				readLine();
			} catch (Exception e) {
			}
		return Integer.parseInt(st.nextToken());
	}

	public double nextDouble() {
		if (st == null || !st.hasMoreTokens())
			try {
				readLine();
			} catch (Exception e) {
			}
		return Double.parseDouble(st.nextToken());
	}

	public Long nextLong() {
		if (st == null || !st.hasMoreTokens())
			try {
				readLine();
			} catch (Exception e) {
			}
		return Long.parseLong(st.nextToken());
	}

	public String next() {
		if (st == null || !st.hasMoreTokens())
			try {
				readLine();
			} catch (Exception e) {
			}
		return st.nextToken();
	}

	public static void readLine() {
		try {
			st = new StringTokenizer(br.readLine());
		} catch (Exception e) {
		}
	}
}

static class Util{
		private static Random random = new Random();
		static long[] fact;
		public static void initFactorial(int n, long mod) {
			fact = new long[n+1];
			fact[0] = 1;
			for (int i = 1; i < n+1; i++) fact[i] = (fact[i - 1] * i) % mod;
		}
		public static long modInverse(long a, long MOD) {
			long[] gcdE = gcdExtended(a, MOD);
			if (gcdE[0] != 1) return -1; // Inverted doesn't exist
			long x = gcdE[1];
			return (x % MOD + MOD) % MOD;
		}
		public static long[] gcdExtended(long p, long q) {
			if (q == 0) return new long[] { p, 1, 0 };
			long[] vals = gcdExtended(q, p % q);
			long tmp = vals[2];
			vals[2] = vals[1] - (p / q) * vals[2];
			vals[1] = tmp;
			return vals;
		}
		public static long nCr(int n, int r, long MOD) {
			if (r == 0) return 1;
			return (fact[n] * modInverse(fact[r], MOD) % MOD * modInverse(fact[n - r], MOD) % MOD) % MOD;
		}
		public static long nCr(int n, int r) {
			return (fact[n]/fact[r])/fact[n-r];
		}
		public static long nPr(int n, int r, long MOD) {
			if (r == 0) return 1;
			return (fact[n] * modInverse(fact[n - r], MOD) % MOD) % MOD;
		}
		public static long nPr(int n, int r) {
			return fact[n]/fact[n-r];
		}
		public static boolean isPrime(int n) {
	        if (n <= 1) return false;
	        if (n <= 3) return true;
	        if (n % 2 == 0 || n % 3 == 0) return false;
	        for (int i = 5; i * i <= n; i = i + 6)
	            if (n % i == 0 || n % (i + 2) == 0)
	            return false;
	        return true;
	    }
	    public static int lowerBound(int[] a, int v) {
	    	int l = 0, h = a.length;
	    	while(l<h) {
	    		int mid = (l+h)/2;
	    		if(v<=a[mid]) h = mid;
	    		else l = mid+1;
	    	}
	    	return l;
	    }
	    public static int lowerBound(long[] a, long v) {
	    	int l = 0, h = a.length;
	    	while(l<h) {
	    		int mid = (l+h)/2;
	    		if(v<=a[mid]) h = mid;
	    		else l = mid+1;
	    	}
	    	return l;
	    }
	    public static int upperBound(int[] a, int v) {
	    	int l = 0, h = a.length;
	    	while(l<h) {
	    		int mid = (l+h)/2;
	    		if(a[mid]<=v) l = mid+1;
	    		else h = mid;
	    	}
	    	return l;
	    }
	    public static int upperBound(long[] a, long v) {
	    	int l = 0, h = a.length;
	    	while(l<h) {
	    		int mid = (l+h)/2;
	    		if(a[mid]<=v) l = mid+1;
	    		else h = mid;
	    	}
	    	return l;
	    }
	    public static boolean[] getSieve(int n) {
	        boolean[] isPrime = new boolean[n+1];
	        for (int i = 2; i <= n; i++) isPrime[i] = true;
	        for (int i = 2; i*i <= n; i++) if (isPrime[i])
	                for (int j = i; i*j <= n; j++) isPrime[i*j] = false;
	        return isPrime;
	    }
	    public static int gcd(int a, int b) {
	    	int tmp = 0;
	    	while(b != 0) {
	    		tmp = b;
	    		b = a%b;
	    		a = tmp;
	    	}
	    	return a;
	    }
	    public static long gcd(long a, long b) {
	    	long tmp = 0;
	    	while(b != 0) {
	    		tmp = b;
	    		b = a%b;
	    		a = tmp;
	    	}
	    	return a;
	    }
	    public static int random(int min, int max) {
	    	return random.nextInt(max-min+1)+min;
	    }
		public static void dbg(Object... o) {
			System.out.println(Arrays.deepToString(o));
		}
		public static void reverse(int[] s, int l , int r) {
			for(int i = l; i<=(l+r)/2; i++) {
				int tmp = s[i];
				s[i] = s[r+l-i];
				s[r+l-i] = tmp;
			}
	    }
		public static void reverse(int[] s) {
			reverse(s, 0, s.length-1);
	    }
		public static void reverse(long[] s, int l , int r) {
			for(int i = l; i<=(l+r)/2; i++) {
				long tmp = s[i];
				s[i] = s[r+l-i];
				s[r+l-i] = tmp;
			}
	    }
		public static void reverse(long[] s) {
			reverse(s, 0, s.length-1);
	    }
		public static void reverse(float[] s, int l , int r) {
			for(int i = l; i<=(l+r)/2; i++) {
				float tmp = s[i];
				s[i] = s[r+l-i];
				s[r+l-i] = tmp;
			}
	    }
		public static void reverse(float[] s) {
			reverse(s, 0, s.length-1);
	    }
		public static void reverse(double[] s, int l , int r) {
			for(int i = l; i<=(l+r)/2; i++) {
				double tmp = s[i];
				s[i] = s[r+l-i];
				s[r+l-i] = tmp;
			}
	    }
		public static void reverse(double[] s) {
			reverse(s, 0, s.length-1);
	    }
		public static void reverse(char[] s, int l , int r) {
			for(int i = l; i<=(l+r)/2; i++) {
				char tmp = s[i];
				s[i] = s[r+l-i];
				s[r+l-i] = tmp;
			}
	    }
		public static void reverse(char[] s) {
			reverse(s, 0, s.length-1);
	    }
		public static <T> void reverse(T[] s, int l , int r) {
			for(int i = l; i<=(l+r)/2; i++) {
				T tmp = s[i];
				s[i] = s[r+l-i];
				s[r+l-i] = tmp;
			}
	    }
		public static <T> void reverse(T[] s) {
			reverse(s, 0, s.length-1);
	    }
		public static void shuffle(int[] s) {
	        for (int i = 0; i < s.length; ++i) {
	            int j = random.nextInt(i + 1);
	            int t = s[i];
	            s[i] = s[j];
	            s[j] = t;
	        }
	    }
	    public static void shuffle(long[] s) {
	        for (int i = 0; i < s.length; ++i) {
	            int j = random.nextInt(i + 1);
	            long t = s[i];
	            s[i] = s[j];
	            s[j] = t;
	        }
	    }
	    public static void shuffle(float[] s) {
	        for (int i = 0; i < s.length; ++i) {
	            int j = random.nextInt(i + 1);
	            float t = s[i];
	            s[i] = s[j];
	            s[j] = t;
	        }
	    }
	    public static void shuffle(double[] s) {
	        for (int i = 0; i < s.length; ++i) {
	            int j = random.nextInt(i + 1);
	            double t = s[i];
	            s[i] = s[j];
	            s[j] = t;
	        }
	    }
	    public static void shuffle(char[] s) {
	        for (int i = 0; i < s.length; ++i) {
	            int j = random.nextInt(i + 1);
	            char t = s[i];
	            s[i] = s[j];
	            s[j] = t;
	        }
	    }
	    public static <T> void shuffle(T[] s) {
	        for (int i = 0; i < s.length; ++i) {
	            int j = random.nextInt(i + 1);
	            T t = s[i];
	            s[i] = s[j];
	            s[j] = t;
	        }
	    }
		public static void sortArray(int[] a) {
	        shuffle(a);
	        Arrays.sort(a);
	    }
		public static void sortArray(long[] a) {
			shuffle(a);
	        Arrays.sort(a);
	    }
		public static void sortArray(float[] a) {
			shuffle(a);
	        Arrays.sort(a);
	    }
		public static void sortArray(double[] a) {
			shuffle(a);
	        Arrays.sort(a);
	    }
		public static void sortArray(char[] a) {
			shuffle(a);
	        Arrays.sort(a);
	    }
		public static <T extends Comparable<T>> void sortArray(T[] a) {
	        Arrays.sort(a);
	    }
	}

static class Writer {
	private PrintWriter pw;
	public Writer(){
		pw = new PrintWriter(System.out);
	}

	public Writer(String f){
		try {
			pw = new PrintWriter(new FileWriter(f));
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	public void printArray(int[] a) {
		for(int i = 0; i<a.length; i++) print(a[i]+" ");
	}
	public void printlnArray(int[] a) {
		for(int i = 0; i<a.length; i++) print(a[i]+" ");
		pw.println();
	}
	public void printArray(long[] a) {
		for(int i = 0; i<a.length; i++) print(a[i]+" ");
	}
	public void printlnArray(long[] a) {
		for(int i = 0; i<a.length; i++) print(a[i]+" ");
		pw.println();
	}
	public void print(Object o) {
		pw.print(o.toString());
	}
	public void println(Object o) {
		pw.println(o.toString());
	}
	public void println() {
		pw.println();
	}
	public void flush() {
		pw.flush();
	}
	public void exit() {
		pw.close();
	}
}
}


import java.util.ArrayList;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.Random;
import java.io.FileWriter;
import java.io.PrintWriter;
/*
    Solution Created: 19:49:47 12/07/2020
    Custom Competitive programming helper.
*/

public class Main {
	static int n, m, fireballCost, fireballLen, berserkCost;
	static boolean worthToRemoveOneByOne = false;
	public static void solve(Reader in, Writer out) {
		/*
		ArrayList<Integer> v = new ArrayList<Integer>();
		fireballCost = 50;
		fireballLen = 3;
		berserkCost = 1;

		if(fireballCost>=fireballLen*berserkCost) worthToRemoveOneByOne = true;
		v.add(1);
		v.add(7);
		v.add(10);
		v.add(4);
		v.add(8);
		v.add(2);
		out.println(rangeCost(3, 7, v));
		out.flush();*/
		n = in.nextInt();
		m = in.nextInt();
		fireballCost =in.nextInt();
		fireballLen = in.nextInt();
		berserkCost = in.nextInt();
		int[] a = in.na(n), b = in.na(m);
		if(fireballCost>=fireballLen*berserkCost) worthToRemoveOneByOne = true;
		int[] pos = new int[n+1];
		Arrays.fill(pos, -1);
		for(int i = 0; i<n; i++) pos[a[i]] = i;
		if(pos[b[0]]==-1 || pos[b[m-1]]==-1) exitFalse();
		ArrayList<Integer> values = new ArrayList<Integer>();
		for(int i = 0; i!=pos[b[0]]; i++) values.add(a[i]);
		long ans = 0;
		int cost = rangeCost(Integer.MIN_VALUE, b[0], values);
		if(cost == -1) exitFalse();
		ans+= cost;

		values.clear();
		for(int i = n-1; i!=pos[b[m-1]]; i--) values.add(a[i]);
		cost = rangeCost(b[m-1], Integer.MIN_VALUE, values);
		if(cost == -1) exitFalse();
		ans+= cost;
		for(int i = 0; i<m-1; i++) {
			int l = b[i], r = b[i+1];
			if(pos[l]>pos[r]) exitFalse();
			values.clear();
			for(int j = pos[l]+1; j<pos[r]; j++) values.add(a[j]);
			cost = rangeCost(b[i], b[i+1], values);
			if(cost == -1) exitFalse();
			ans+= cost;
		}
		out.println(ans);
	}
	public static void exitFalse() {
		System.out.println(-1);
		System.exit(0);
	}
	public static int rangeCost(int lBorder, int rBorder, ArrayList<Integer> a) {
		int l = 0, r = a.size()-1;
		while(l<a.size() && a.get(l)<lBorder) l++;
		while(r>=0 && a.get(r)<rBorder) r--;
		if(l>r) {
			if(worthToRemoveOneByOne) return a.size()*berserkCost;
			int parts = a.size()/fireballLen;
			return parts*fireballCost + (a.size()-parts*fireballLen)*berserkCost;
		}
		int minFireball = r-l+1;
		int maxBerzerk = a.size()-minFireball;
		if(!worthToRemoveOneByOne) {
			int parts = a.size()/fireballLen;
			int leftBerzerk = a.size()-parts*fireballLen;
			if(leftBerzerk>maxBerzerk) return -1;
			return parts*fireballCost + leftBerzerk*berserkCost;
		}
		while((r-l+1)%fireballLen!=0) {
			if(l==0&&r==a.size()-1) return -1;
			if(l>0) l--;
			else if(r>0) r++;
		}
		int fireballs = (r-l+1)/fireballLen;
		int berzerks = a.size()-(r-l+1);
		return fireballs*fireballCost + berzerks*berserkCost;
	}
	public static void main(String[] args) {
		Reader in = new Reader();
		Writer out = new Writer();
		solve(in, out);
		out.exit();
	}

static class Reader {
	static BufferedReader br;
	static StringTokenizer st;
	private int charIdx = 0;
	private String s;

	public Reader() {
		this.br = new BufferedReader(new InputStreamReader(System.in));
	}

	public Reader(String f){
		try {
			this.br = new BufferedReader(new FileReader(f));
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	public int[] na(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = nextInt();
		return a;
	}

	public double[] nd(int n) {
		double[] a = new double[n];
		for (int i = 0; i < n; i++)
			a[i] = nextDouble();
		return a;
	}

	public char nextChar() {
		if (s == null || charIdx >= s.length()) {
			if (st == null || !st.hasMoreTokens())
				try {
					readLine();
				} catch (Exception e) {
				}
			s = st.nextToken();
			charIdx = 0;
		}
		return s.charAt(charIdx++);
	}

	public long[] nl(int n) {
		long[] a = new long[n];
		for (int i = 0; i < n; i++)
			a[i] = nextLong();
		return a;
	}

	public char[] nca() {
		return next().toCharArray();
	}

	public String[] nS(int n) {
		String[] a = new String[n];
		for (int i = 0; i < n; i++)
			a[i] = next();
		return a;
	}

	public int nextInt() {
		if (st == null || !st.hasMoreTokens())
			try {
				readLine();
			} catch (Exception e) {
			}
		return Integer.parseInt(st.nextToken());
	}

	public double nextDouble() {
		if (st == null || !st.hasMoreTokens())
			try {
				readLine();
			} catch (Exception e) {
			}
		return Double.parseDouble(st.nextToken());
	}

	public Long nextLong() {
		if (st == null || !st.hasMoreTokens())
			try {
				readLine();
			} catch (Exception e) {
			}
		return Long.parseLong(st.nextToken());
	}

	public String next() {
		if (st == null || !st.hasMoreTokens())
			try {
				readLine();
			} catch (Exception e) {
			}
		return st.nextToken();
	}

	public static void readLine() {
		try {
			st = new StringTokenizer(br.readLine());
		} catch (Exception e) {
		}
	}
}

static class Util{
		private static Random random = new Random();
		static long[] fact;
		public static void initFactorial(int n, long mod) {
			fact = new long[n+1];
			fact[0] = 1;
			for (int i = 1; i < n+1; i++) fact[i] = (fact[i - 1] * i) % mod;
		}
		public static long modInverse(long a, long MOD) {
			long[] gcdE = gcdExtended(a, MOD);
			if (gcdE[0] != 1) return -1; // Inverted doesn't exist
			long x = gcdE[1];
			return (x % MOD + MOD) % MOD;
		}
		public static long[] gcdExtended(long p, long q) {
			if (q == 0) return new long[] { p, 1, 0 };
			long[] vals = gcdExtended(q, p % q);
			long tmp = vals[2];
			vals[2] = vals[1] - (p / q) * vals[2];
			vals[1] = tmp;
			return vals;
		}
		public static long nCr(int n, int r, long MOD) {
			if (r == 0) return 1;
			return (fact[n] * modInverse(fact[r], MOD) % MOD * modInverse(fact[n - r], MOD) % MOD) % MOD;
		}
		public static long nCr(int n, int r) {
			return (fact[n]/fact[r])/fact[n-r];
		}
		public static long nPr(int n, int r, long MOD) {
			if (r == 0) return 1;
			return (fact[n] * modInverse(fact[n - r], MOD) % MOD) % MOD;
		}
		public static long nPr(int n, int r) {
			return fact[n]/fact[n-r];
		}
		public static boolean isPrime(int n) {
	        if (n <= 1) return false;
	        if (n <= 3) return true;
	        if (n % 2 == 0 || n % 3 == 0) return false;
	        for (int i = 5; i * i <= n; i = i + 6)
	            if (n % i == 0 || n % (i + 2) == 0)
	            return false;
	        return true;
	    }
	    public static int lowerBound(int[] a, int v) {
	    	int l = 0, h = a.length;
	    	while(l<h) {
	    		int mid = (l+h)/2;
	    		if(v<=a[mid]) h = mid;
	    		else l = mid+1;
	    	}
	    	return l;
	    }
	    public static int lowerBound(long[] a, long v) {
	    	int l = 0, h = a.length;
	    	while(l<h) {
	    		int mid = (l+h)/2;
	    		if(v<=a[mid]) h = mid;
	    		else l = mid+1;
	    	}
	    	return l;
	    }
	    public static int upperBound(int[] a, int v) {
	    	int l = 0, h = a.length;
	    	while(l<h) {
	    		int mid = (l+h)/2;
	    		if(a[mid]<=v) l = mid+1;
	    		else h = mid;
	    	}
	    	return l;
	    }
	    public static int upperBound(long[] a, long v) {
	    	int l = 0, h = a.length;
	    	while(l<h) {
	    		int mid = (l+h)/2;
	    		if(a[mid]<=v) l = mid+1;
	    		else h = mid;
	    	}
	    	return l;
	    }
	    public static boolean[] getSieve(int n) {
	        boolean[] isPrime = new boolean[n+1];
	        for (int i = 2; i <= n; i++) isPrime[i] = true;
	        for (int i = 2; i*i <= n; i++) if (isPrime[i])
	                for (int j = i; i*j <= n; j++) isPrime[i*j] = false;
	        return isPrime;
	    }
	    public static int gcd(int a, int b) {
	    	int tmp = 0;
	    	while(b != 0) {
	    		tmp = b;
	    		b = a%b;
	    		a = tmp;
	    	}
	    	return a;
	    }
	    public static long gcd(long a, long b) {
	    	long tmp = 0;
	    	while(b != 0) {
	    		tmp = b;
	    		b = a%b;
	    		a = tmp;
	    	}
	    	return a;
	    }
	    public static int random(int min, int max) {
	    	return random.nextInt(max-min+1)+min;
	    }
		public static void dbg(Object... o) {
			System.out.println(Arrays.deepToString(o));
		}
		public static void reverse(int[] s, int l , int r) {
			for(int i = l; i<=(l+r)/2; i++) {
				int tmp = s[i];
				s[i] = s[r+l-i];
				s[r+l-i] = tmp;
			}
	    }
		public static void reverse(int[] s) {
			reverse(s, 0, s.length-1);
	    }
		public static void reverse(long[] s, int l , int r) {
			for(int i = l; i<=(l+r)/2; i++) {
				long tmp = s[i];
				s[i] = s[r+l-i];
				s[r+l-i] = tmp;
			}
	    }
		public static void reverse(long[] s) {
			reverse(s, 0, s.length-1);
	    }
		public static void reverse(float[] s, int l , int r) {
			for(int i = l; i<=(l+r)/2; i++) {
				float tmp = s[i];
				s[i] = s[r+l-i];
				s[r+l-i] = tmp;
			}
	    }
		public static void reverse(float[] s) {
			reverse(s, 0, s.length-1);
	    }
		public static void reverse(double[] s, int l , int r) {
			for(int i = l; i<=(l+r)/2; i++) {
				double tmp = s[i];
				s[i] = s[r+l-i];
				s[r+l-i] = tmp;
			}
	    }
		public static void reverse(double[] s) {
			reverse(s, 0, s.length-1);
	    }
		public static void reverse(char[] s, int l , int r) {
			for(int i = l; i<=(l+r)/2; i++) {
				char tmp = s[i];
				s[i] = s[r+l-i];
				s[r+l-i] = tmp;
			}
	    }
		public static void reverse(char[] s) {
			reverse(s, 0, s.length-1);
	    }
		public static <T> void reverse(T[] s, int l , int r) {
			for(int i = l; i<=(l+r)/2; i++) {
				T tmp = s[i];
				s[i] = s[r+l-i];
				s[r+l-i] = tmp;
			}
	    }
		public static <T> void reverse(T[] s) {
			reverse(s, 0, s.length-1);
	    }
		public static void shuffle(int[] s) {
	        for (int i = 0; i < s.length; ++i) {
	            int j = random.nextInt(i + 1);
	            int t = s[i];
	            s[i] = s[j];
	            s[j] = t;
	        }
	    }
	    public static void shuffle(long[] s) {
	        for (int i = 0; i < s.length; ++i) {
	            int j = random.nextInt(i + 1);
	            long t = s[i];
	            s[i] = s[j];
	            s[j] = t;
	        }
	    }
	    public static void shuffle(float[] s) {
	        for (int i = 0; i < s.length; ++i) {
	            int j = random.nextInt(i + 1);
	            float t = s[i];
	            s[i] = s[j];
	            s[j] = t;
	        }
	    }
	    public static void shuffle(double[] s) {
	        for (int i = 0; i < s.length; ++i) {
	            int j = random.nextInt(i + 1);
	            double t = s[i];
	            s[i] = s[j];
	            s[j] = t;
	        }
	    }
	    public static void shuffle(char[] s) {
	        for (int i = 0; i < s.length; ++i) {
	            int j = random.nextInt(i + 1);
	            char t = s[i];
	            s[i] = s[j];
	            s[j] = t;
	        }
	    }
	    public static <T> void shuffle(T[] s) {
	        for (int i = 0; i < s.length; ++i) {
	            int j = random.nextInt(i + 1);
	            T t = s[i];
	            s[i] = s[j];
	            s[j] = t;
	        }
	    }
		public static void sortArray(int[] a) {
	        shuffle(a);
	        Arrays.sort(a);
	    }
		public static void sortArray(long[] a) {
			shuffle(a);
	        Arrays.sort(a);
	    }
		public static void sortArray(float[] a) {
			shuffle(a);
	        Arrays.sort(a);
	    }
		public static void sortArray(double[] a) {
			shuffle(a);
	        Arrays.sort(a);
	    }
		public static void sortArray(char[] a) {
			shuffle(a);
	        Arrays.sort(a);
	    }
		public static <T extends Comparable<T>> void sortArray(T[] a) {
	        Arrays.sort(a);
	    }
	}

static class Writer {
	private PrintWriter pw;
	public Writer(){
		pw = new PrintWriter(System.out);
	}

	public Writer(String f){
		try {
			pw = new PrintWriter(new FileWriter(f));
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	public void printArray(int[] a) {
		for(int i = 0; i<a.length; i++) print(a[i]+" ");
	}
	public void printlnArray(int[] a) {
		for(int i = 0; i<a.length; i++) print(a[i]+" ");
		pw.println();
	}
	public void printArray(long[] a) {
		for(int i = 0; i<a.length; i++) print(a[i]+" ");
	}
	public void printlnArray(long[] a) {
		for(int i = 0; i<a.length; i++) print(a[i]+" ");
		pw.println();
	}
	public void print(Object o) {
		pw.print(o.toString());
	}
	public void println(Object o) {
		pw.println(o.toString());
	}
	public void println() {
		pw.println();
	}
	public void flush() {
		pw.flush();
	}
	public void exit() {
		pw.close();
	}
}
}


import java.util.ArrayList;
import java.util.Arrays;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.Random;
import java.io.FileWriter;
import java.io.PrintWriter;
/*
    Solution Created: 20:18:27 12/07/2020
    Custom Competitive programming helper.
*/

public class Main {
	static int n, m, fireballCost, fireballLen, berserkCost;
	static boolean worthToRemoveOneByOne = false;
	public static void solve(Reader in, Writer out) {
		/*
		ArrayList<Integer> v = new ArrayList<Integer>();
		fireballCost = 50;
		fireballLen = 3;
		berserkCost = 1;

		if(fireballCost>=fireballLen*berserkCost) worthToRemoveOneByOne = true;
		v.add(1);
		v.add(5);
		v.add(4);
		v.add(4);
		v.add(6);
		v.add(2);
		out.println(rangeCost(3, 7, v));
		out.flush();
		*/
		n = in.nextInt();
		m = in.nextInt();
		fireballCost =in.nextInt();
		fireballLen = in.nextInt();
		berserkCost = in.nextInt();
		int[] a = in.na(n), b = in.na(m);
		long ans = 0;
		if(fireballCost>=fireballLen*berserkCost) worthToRemoveOneByOne = true;
		int[] pos = new int[n+1];
		Arrays.fill(pos, -1);
		for(int i = 0; i<n; i++) pos[a[i]] = i; //position array

		if(pos[b[0]]==-1 || pos[b[m-1]]==-1) exitFalse(); //edge check

		ArrayList<Integer> values = new ArrayList<Integer>(); //values array

		//check left
		for(int i = 0; i!=pos[b[0]]; i++) values.add(a[i]);
		int cost = rangeCost(Integer.MIN_VALUE, b[0], values);
		if(cost == -1) exitFalse();
		ans+= cost;

		//check right
		values.clear();
		for(int i = n-1; i!=pos[b[m-1]]; i--) values.add(a[i]);
		cost = rangeCost(b[m-1], Integer.MIN_VALUE, values);
		if(cost == -1) exitFalse();
		ans+= cost;

		//check segments
		for(int i = 0; i<m-1; i++) {
			int l = b[i], r = b[i+1];
			int lP = pos[l], rP = pos[r];
			if(lP>rP || lP == -1 || rP == -1) exitFalse();
			values.clear();
			for(int j = lP+1; j<rP; j++) values.add(a[j]);
			cost = rangeCost(l, r, values);
			if(cost == -1) exitFalse();
			ans+= cost;
		}
		out.println(ans);
	}
	public static void exitFalse() {
		System.out.println(-1);
		System.exit(0);
	}
	public static int rangeCost(int lBorder, int rBorder, ArrayList<Integer> a) {
		int l = 0, r = a.size()-1;
		while(l<a.size() && a.get(l)<lBorder) l++;
		while(r>=0 && a.get(r)<rBorder) r--;
		if(l>r) {
			if(worthToRemoveOneByOne) return a.size()*berserkCost;
			return (a.size()/fireballLen)*fireballCost + (a.size()%fireballLen)*berserkCost;
		}
		int minFireball = r-l+1;
		int maxBerzerk = a.size()-minFireball;
		if(!worthToRemoveOneByOne) {
			int parts = a.size()/fireballLen;
			int leftBerzerk = a.size()%fireballLen;
			if(leftBerzerk>maxBerzerk) return -1;
			return parts*fireballCost + leftBerzerk*berserkCost;
		}
		while((r-l+1)%fireballLen!=0) {
			if(l==0&&r==a.size()-1) return -1;
			if(l>0) l--;
			else if(r>0) r++;
		}
		int fireballs = (r-l+1)/fireballLen;
		int berzerks = a.size()-(r-l+1);
		return fireballs*fireballCost + berzerks*berserkCost;
	}
	public static void main(String[] args) {
		Reader in = new Reader();
		Writer out = new Writer();
		solve(in, out);
		out.exit();
	}

static class Reader {
	static BufferedReader br;
	static StringTokenizer st;
	private int charIdx = 0;
	private String s;

	public Reader() {
		this.br = new BufferedReader(new InputStreamReader(System.in));
	}

	public Reader(String f){
		try {
			this.br = new BufferedReader(new FileReader(f));
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	public int[] na(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = nextInt();
		return a;
	}

	public double[] nd(int n) {
		double[] a = new double[n];
		for (int i = 0; i < n; i++)
			a[i] = nextDouble();
		return a;
	}

	public char nextChar() {
		if (s == null || charIdx >= s.length()) {
			if (st == null || !st.hasMoreTokens())
				try {
					readLine();
				} catch (Exception e) {
				}
			s = st.nextToken();
			charIdx = 0;
		}
		return s.charAt(charIdx++);
	}

	public long[] nl(int n) {
		long[] a = new long[n];
		for (int i = 0; i < n; i++)
			a[i] = nextLong();
		return a;
	}

	public char[] nca() {
		return next().toCharArray();
	}

	public String[] nS(int n) {
		String[] a = new String[n];
		for (int i = 0; i < n; i++)
			a[i] = next();
		return a;
	}

	public int nextInt() {
		if (st == null || !st.hasMoreTokens())
			try {
				readLine();
			} catch (Exception e) {
			}
		return Integer.parseInt(st.nextToken());
	}

	public double nextDouble() {
		if (st == null || !st.hasMoreTokens())
			try {
				readLine();
			} catch (Exception e) {
			}
		return Double.parseDouble(st.nextToken());
	}

	public Long nextLong() {
		if (st == null || !st.hasMoreTokens())
			try {
				readLine();
			} catch (Exception e) {
			}
		return Long.parseLong(st.nextToken());
	}

	public String next() {
		if (st == null || !st.hasMoreTokens())
			try {
				readLine();
			} catch (Exception e) {
			}
		return st.nextToken();
	}

	public static void readLine() {
		try {
			st = new StringTokenizer(br.readLine());
		} catch (Exception e) {
		}
	}
}

static class Util{
		private static Random random = new Random();
		static long[] fact;
		public static void initFactorial(int n, long mod) {
			fact = new long[n+1];
			fact[0] = 1;
			for (int i = 1; i < n+1; i++) fact[i] = (fact[i - 1] * i) % mod;
		}
		public static long modInverse(long a, long MOD) {
			long[] gcdE = gcdExtended(a, MOD);
			if (gcdE[0] != 1) return -1; // Inverted doesn't exist
			long x = gcdE[1];
			return (x % MOD + MOD) % MOD;
		}
		public static long[] gcdExtended(long p, long q) {
			if (q == 0) return new long[] { p, 1, 0 };
			long[] vals = gcdExtended(q, p % q);
			long tmp = vals[2];
			vals[2] = vals[1] - (p / q) * vals[2];
			vals[1] = tmp;
			return vals;
		}
		public static long nCr(int n, int r, long MOD) {
			if (r == 0) return 1;
			return (fact[n] * modInverse(fact[r], MOD) % MOD * modInverse(fact[n - r], MOD) % MOD) % MOD;
		}
		public static long nCr(int n, int r) {
			return (fact[n]/fact[r])/fact[n-r];
		}
		public static long nPr(int n, int r, long MOD) {
			if (r == 0) return 1;
			return (fact[n] * modInverse(fact[n - r], MOD) % MOD) % MOD;
		}
		public static long nPr(int n, int r) {
			return fact[n]/fact[n-r];
		}
		public static boolean isPrime(int n) {
	        if (n <= 1) return false;
	        if (n <= 3) return true;
	        if (n % 2 == 0 || n % 3 == 0) return false;
	        for (int i = 5; i * i <= n; i = i + 6)
	            if (n % i == 0 || n % (i + 2) == 0)
	            return false;
	        return true;
	    }
	    public static int lowerBound(int[] a, int v) {
	    	int l = 0, h = a.length;
	    	while(l<h) {
	    		int mid = (l+h)/2;
	    		if(v<=a[mid]) h = mid;
	    		else l = mid+1;
	    	}
	    	return l;
	    }
	    public static int lowerBound(long[] a, long v) {
	    	int l = 0, h = a.length;
	    	while(l<h) {
	    		int mid = (l+h)/2;
	    		if(v<=a[mid]) h = mid;
	    		else l = mid+1;
	    	}
	    	return l;
	    }
	    public static int upperBound(int[] a, int v) {
	    	int l = 0, h = a.length;
	    	while(l<h) {
	    		int mid = (l+h)/2;
	    		if(a[mid]<=v) l = mid+1;
	    		else h = mid;
	    	}
	    	return l;
	    }
	    public static int upperBound(long[] a, long v) {
	    	int l = 0, h = a.length;
	    	while(l<h) {
	    		int mid = (l+h)/2;
	    		if(a[mid]<=v) l = mid+1;
	    		else h = mid;
	    	}
	    	return l;
	    }
	    public static boolean[] getSieve(int n) {
	        boolean[] isPrime = new boolean[n+1];
	        for (int i = 2; i <= n; i++) isPrime[i] = true;
	        for (int i = 2; i*i <= n; i++) if (isPrime[i])
	                for (int j = i; i*j <= n; j++) isPrime[i*j] = false;
	        return isPrime;
	    }
	    public static int gcd(int a, int b) {
	    	int tmp = 0;
	    	while(b != 0) {
	    		tmp = b;
	    		b = a%b;
	    		a = tmp;
	    	}
	    	return a;
	    }
	    public static long gcd(long a, long b) {
	    	long tmp = 0;
	    	while(b != 0) {
	    		tmp = b;
	    		b = a%b;
	    		a = tmp;
	    	}
	    	return a;
	    }
	    public static int random(int min, int max) {
	    	return random.nextInt(max-min+1)+min;
	    }
		public static void dbg(Object... o) {
			System.out.println(Arrays.deepToString(o));
		}
		public static void reverse(int[] s, int l , int r) {
			for(int i = l; i<=(l+r)/2; i++) {
				int tmp = s[i];
				s[i] = s[r+l-i];
				s[r+l-i] = tmp;
			}
	    }
		public static void reverse(int[] s) {
			reverse(s, 0, s.length-1);
	    }
		public static void reverse(long[] s, int l , int r) {
			for(int i = l; i<=(l+r)/2; i++) {
				long tmp = s[i];
				s[i] = s[r+l-i];
				s[r+l-i] = tmp;
			}
	    }
		public static void reverse(long[] s) {
			reverse(s, 0, s.length-1);
	    }
		public static void reverse(float[] s, int l , int r) {
			for(int i = l; i<=(l+r)/2; i++) {
				float tmp = s[i];
				s[i] = s[r+l-i];
				s[r+l-i] = tmp;
			}
	    }
		public static void reverse(float[] s) {
			reverse(s, 0, s.length-1);
	    }
		public static void reverse(double[] s, int l , int r) {
			for(int i = l; i<=(l+r)/2; i++) {
				double tmp = s[i];
				s[i] = s[r+l-i];
				s[r+l-i] = tmp;
			}
	    }
		public static void reverse(double[] s) {
			reverse(s, 0, s.length-1);
	    }
		public static void reverse(char[] s, int l , int r) {
			for(int i = l; i<=(l+r)/2; i++) {
				char tmp = s[i];
				s[i] = s[r+l-i];
				s[r+l-i] = tmp;
			}
	    }
		public static void reverse(char[] s) {
			reverse(s, 0, s.length-1);
	    }
		public static <T> void reverse(T[] s, int l , int r) {
			for(int i = l; i<=(l+r)/2; i++) {
				T tmp = s[i];
				s[i] = s[r+l-i];
				s[r+l-i] = tmp;
			}
	    }
		public static <T> void reverse(T[] s) {
			reverse(s, 0, s.length-1);
	    }
		public static void shuffle(int[] s) {
	        for (int i = 0; i < s.length; ++i) {
	            int j = random.nextInt(i + 1);
	            int t = s[i];
	            s[i] = s[j];
	            s[j] = t;
	        }
	    }
	    public static void shuffle(long[] s) {
	        for (int i = 0; i < s.length; ++i) {
	            int j = random.nextInt(i + 1);
	            long t = s[i];
	            s[i] = s[j];
	            s[j] = t;
	        }
	    }
	    public static void shuffle(float[] s) {
	        for (int i = 0; i < s.length; ++i) {
	            int j = random.nextInt(i + 1);
	            float t = s[i];
	            s[i] = s[j];
	            s[j] = t;
	        }
	    }
	    public static void shuffle(double[] s) {
	        for (int i = 0; i < s.length; ++i) {
	            int j = random.nextInt(i + 1);
	            double t = s[i];
	            s[i] = s[j];
	            s[j] = t;
	        }
	    }
	    public static void shuffle(char[] s) {
	        for (int i = 0; i < s.length; ++i) {
	            int j = random.nextInt(i + 1);
	            char t = s[i];
	            s[i] = s[j];
	            s[j] = t;
	        }
	    }
	    public static <T> void shuffle(T[] s) {
	        for (int i = 0; i < s.length; ++i) {
	            int j = random.nextInt(i + 1);
	            T t = s[i];
	            s[i] = s[j];
	            s[j] = t;
	        }
	    }
		public static void sortArray(int[] a) {
	        shuffle(a);
	        Arrays.sort(a);
	    }
		public static void sortArray(long[] a) {
			shuffle(a);
	        Arrays.sort(a);
	    }
		public static void sortArray(float[] a) {
			shuffle(a);
	        Arrays.sort(a);
	    }
		public static void sortArray(double[] a) {
			shuffle(a);
	        Arrays.sort(a);
	    }
		public static void sortArray(char[] a) {
			shuffle(a);
	        Arrays.sort(a);
	    }
		public static <T extends Comparable<T>> void sortArray(T[] a) {
	        Arrays.sort(a);
	    }
	}

static class Writer {
	private PrintWriter pw;
	public Writer(){
		pw = new PrintWriter(System.out);
	}

	public Writer(String f){
		try {
			pw = new PrintWriter(new FileWriter(f));
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	public void printArray(int[] a) {
		for(int i = 0; i<a.length; i++) print(a[i]+" ");
	}
	public void printlnArray(int[] a) {
		for(int i = 0; i<a.length; i++) print(a[i]+" ");
		pw.println();
	}
	public void printArray(long[] a) {
		for(int i = 0; i<a.length; i++) print(a[i]+" ");
	}
	public void printlnArray(long[] a) {
		for(int i = 0; i<a.length; i++) print(a[i]+" ");
		pw.println();
	}
	public void print(Object o) {
		pw.print(o.toString());
	}
	public void println(Object o) {
		pw.println(o.toString());
	}
	public void println() {
		pw.println();
	}
	public void flush() {
		pw.flush();
	}
	public void exit() {
		pw.close();
	}
}
}