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

public class Main {
    static PrintWriter pw;
    static Scanner sc;
    static long ceildiv(long x, long y){ return (x+y-1)/y;}
    public static void main(String[] args) throws Exception {
        sc= new Scanner(System.in);
        pw=new PrintWriter(System.out);
        int n=sc.nextInt(), m=sc.nextInt();
        Integer[] a=sc.nextsort(n), b=sc.nextsort(m);
        Arrays.sort(a, Collections.reverseOrder()); Arrays.sort(b);
        if(a[0]>b[0]){
            pw.println(-1);
            pw.close();
            return;
        }
        long ans=0l;
        ans+=a[0];
        for(int i=1; i<m; i++)
            ans+=b[i];
        if(a[0]<b[0]){
            ans+=b[0]+1l*(m-1)*a[1];
            for(int i=2; i<n; i++)
                ans+=1l*a[i]*m;
        }else{
            for(int i=1; i<n; i++)
                ans+=1l*a[i]*m;
        }
        pw.println(ans);
        pw.close();
    }
    static void printArr(int[] arr){
        for(int i=0; i<arr.length-1; i++)
            pw.print(arr[i]+" ");
        pw.println(arr[arr.length-1]);
    }
    static void printArr(long[] arr){
        for(int i=0; i<arr.length-1; i++)
            pw.print(arr[i]+" ");
        pw.println(arr[arr.length-1]);
    }
    static void printArr(Integer[] arr){
        for(int i=0; i<arr.length-1; i++)
            pw.print(arr[i]+" ");
        pw.println(arr[arr.length-1]);
    }
    static class Scanner {
        StringTokenizer st;
        BufferedReader br;
        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public Scanner(FileReader r) {
            br = new BufferedReader(r);
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

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

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

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

        public int[] nextArr(int n) throws IOException {
            int[] arr = new int[n];
            for (int i = 0; i < arr.length; i++)
                arr[i] = nextInt();
            return arr;
        }
        public Integer[] nextsort(int n) throws IOException{
            Integer[] arr=new Integer[n];
            for(int i=0; i<n; i++)
                arr[i]=nextInt();
            return arr;
        }
        public Pair nextPair() throws IOException{
            return new Pair(nextInt(), nextInt());
        }
        public Pair[] nextPairArr(int n, int l) throws IOException{
            Pair[] arr=new Pair[n];
            if(l==2){
                int[] a=nextArr(n), b=nextArr(n);
                for(int i=0; i<n; i++)
                    arr[i]=new Pair(a[i], b[i]);
                return arr;
            }
            for(int i=0; i<n; i++)
                arr[i]=new Pair(nextInt(), nextInt());
            return arr;
        }
        public boolean ready() throws IOException {
            return br.ready();
        }
    }
    static class Pair implements Comparable<Pair>{
        int x;
        int y;
        public Pair(int x, int y) {
            this.x=x;
            this.y=y;
        }
        public int hashCode() {
            return this.x*1000+this.y;
        }
        public int compareTo(Pair other) {
            if(this.y!=other.y)
                return this.y-other.y;
            return this.x-other.x;
        }
        public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (this.getClass() != obj.getClass()) {
                return false;
            }
            Pair p = (Pair) obj;
            if(this.x==p.x)
                return this.y==p.y;
            if(this.x==p.y)
                return this.y==p.x;
            else
                return false;
        }
        public boolean equal(Pair p){
            if(this.x==p.x)
                return this.y==p.y;
            if(this.x==p.y)
                return this.y==p.x;
            else
                return false;
        }
    }
}


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

public class Solution {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		int n = in.nextInt(), m = in.nextInt();
		int b[] = new int[n], g[] = new int[m];
		int sb = 0, sg = 0;
		for(int i = 0; i < n; i++) {
			b[i] = in.nextInt();
			sb += b[i];
		}
		for(int i = 0; i < m; i++) {
			g[i] = in.nextInt();
			sg += g[i];
		}
		Arrays.parallelSort(b);
		Arrays.parallelSort(g);
		if(g[0] < b[n - 1])
			System.out.println(-1);
		else if(g[0] == b[n - 1])
			System.out.println((sb - b[n - 1]) * m + sg);
		else
			System.out.println((sb - b[n - 1]) * m + sg + b[n - 1] - b[n - 2]);
		in.close();

	}

}


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

public class Solution {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		int n = in.nextInt(), m = in.nextInt();
		int b[] = new int[n], g[] = new int[m];
		long sb = 0, sg = 0;
		for(int i = 0; i < n; i++) {
			b[i] = in.nextInt();
			sb += b[i];
		}
		for(int i = 0; i < m; i++) {
			g[i] = in.nextInt();
			sg += g[i];
		}
		Arrays.parallelSort(b);
		Arrays.parallelSort(g);
		if(g[0] < b[n - 1])
			System.out.println(-1);
		else if(g[0] == b[n - 1])
			System.out.println((sb - b[n - 1]) * m + sg);
		else
			System.out.println((sb - b[n - 1]) * m + sg + b[n - 1] - b[n - 2]);
		in.close();

	}

}


import java.util.*;
import java.math.*;

// **** C. The party and sweets ****

public class C {
	static char [] in = new char [1000000];
	public static void main (String [] arg) throws Throwable {
		int n = nextInt();
		int m = nextInt();
		int [] b = new int [n];
		int [] g = new int [m];
		int MAX1 = -1;
		int MAX2 = -1;
		long total = 0;
		for (int i = 0; i<n; ++i) {
			b[i] = nextInt();
			if (b[i] >= MAX1) {
				MAX2 = MAX1;
				MAX1 = b[i];
			} else if (b[i] >= MAX2) {
				MAX2 = b[i];
			}
			total += ((long)b[i]) * ((long)m);
		}

		int count_adjust = 0;
		for (int i = 0; i<m; ++i) g[i] = nextInt();
		for (int i = 0; i<m && total >= 0; ++i) {
			if (g[i] > MAX1) {
				count_adjust++;
				total += g[i] - MAX1;
			} else if (g[i] < MAX1) {
				total = -1;
			}
		}
		if (total >= 0 && count_adjust == m) total += MAX1 - MAX2;
		System.out.println(total);

	}

	/************** HELPER CLASSES ***************/
    static class HS extends HashSet<Integer>{public HS(){super();}public HS(int a){super(a);}};
	static class AL extends ArrayList<Integer>{public AL(){super();}public AL(int a){super (a);}};
	static class Pair implements Comparable<Pair>{int x,y,L; public Pair(int xx, int yy, int LL){x=xx;y=yy;L=LL;} public int compareTo(Pair p) {return this.L-L;}}

	/************** FAST IO CODE FOLLOWS *****************/
	public static long nextLong() throws Throwable {
		long i = System.in.read();boolean neg = false;while (i < 33) i = System.in.read();if (i == 45) {neg=true;i=48;}i = i - 48;
		int j = System.in.read();while (j > 32) {i*=10;i+=j-48;j = System.in.read();}return (neg) ? -i : i;
	}
	public static int nextInt() throws Throwable {return (int)nextLong();}
	public static String next() throws Throwable {
		int i = 0; while (i < 33 && i != -1) i = System.in.read(); int cptr = 0; while (i >= 33) { in[cptr++] = (char)i; i = System.in.read();}
		return new String(in, 0,cptr);
	}
	/**** LIBRARIES ****/
	public static long gcdL(long a, long b) {while (b != 0) {long tmp = b;b = (a % b);a = tmp;}return a;}
	public static int gcd(int a, int b) {while (b != 0) {int tmp = b;b = (a % b);a = tmp;}return a;}
	public static int[] sieve(int LIM) {
		int i,count = 0;
		boolean [] b = new boolean [LIM];
		for (i = 2;i<LIM; ++i) if (!b[i]) {count++; for (int j = i<<1; j<LIM; j+=i) b[j] = true;}
		int [] primes = new int[count];
		for (i = 2,count=0;i<LIM;++i) if (!b[i]) primes[count++] = i;
		return primes;
	}
	public static int[] numPrimeFactors(int LIM) {
		int i,count = 0;
		int [] b = new int [LIM];
		for (i = 2;i<LIM; ++i) if (b[i] == 0) {count++; for (int j = i; j<LIM; j+=i) b[j]++;}
		return b;
	}
}

/* Full Problem Text:

n boys and m girls came to the party.
Each boy presented each girl some integer number of sweets (possibly zero).
All boys are numbered with integers from 1 to n and all girls are numbered with integers from 1 to m.
For all 1 <q i <q n the minimal number of sweets, which i-th boy presented to some girl is equal to b_i and for all 1 <q i <q m the maximal number of sweets, which i-th girl received from some boy is equal to g_i.
You are interested in the minimum total number of sweets that boys could present.
You are given the numbers b_1, ..., b_n and g_1, ..., g_m, determine this number.

 */


import java.util.*;
import java.math.*;

// **** C. The party and sweets ****

public class C {
	static char [] in = new char [1000000];
	public static void main (String [] arg) throws Throwable {
		int n = nextInt();
		int m = nextInt();
		int [] b = new int [n];
		int [] g = new int [m];
		int MAX1 = -1;
		int MAX2 = -1;
		long total = 0;
		for (int i = 0; i<n; ++i) {
			b[i] = nextInt();
			if (b[i] >= MAX1) {
				MAX2 = MAX1;
				MAX1 = b[i];
			} else if (b[i] >= MAX2) {
				MAX2 = b[i];
			}
			total += b[i] * m;
		}

		int count_adjust = 0;
		for (int i = 0; i<m; ++i) g[i] = nextInt();
		for (int i = 0; i<m && total >= 0; ++i) {
			if (g[i] > MAX1) {
				count_adjust++;
				total += g[i] - MAX1;
			} else if (g[i] < MAX1) {
				total = -1;
			}
		}
		if (total >= 0 && count_adjust == m) total += MAX1 - MAX2;
		System.out.println(total);

	}

	/************** HELPER CLASSES ***************/
    static class HS extends HashSet<Integer>{public HS(){super();}public HS(int a){super(a);}};
	static class AL extends ArrayList<Integer>{public AL(){super();}public AL(int a){super (a);}};
	static class Pair implements Comparable<Pair>{int x,y,L; public Pair(int xx, int yy, int LL){x=xx;y=yy;L=LL;} public int compareTo(Pair p) {return this.L-L;}}

	/************** FAST IO CODE FOLLOWS *****************/
	public static long nextLong() throws Throwable {
		long i = System.in.read();boolean neg = false;while (i < 33) i = System.in.read();if (i == 45) {neg=true;i=48;}i = i - 48;
		int j = System.in.read();while (j > 32) {i*=10;i+=j-48;j = System.in.read();}return (neg) ? -i : i;
	}
	public static int nextInt() throws Throwable {return (int)nextLong();}
	public static String next() throws Throwable {
		int i = 0; while (i < 33 && i != -1) i = System.in.read(); int cptr = 0; while (i >= 33) { in[cptr++] = (char)i; i = System.in.read();}
		return new String(in, 0,cptr);
	}
	/**** LIBRARIES ****/
	public static long gcdL(long a, long b) {while (b != 0) {long tmp = b;b = (a % b);a = tmp;}return a;}
	public static int gcd(int a, int b) {while (b != 0) {int tmp = b;b = (a % b);a = tmp;}return a;}
	public static int[] sieve(int LIM) {
		int i,count = 0;
		boolean [] b = new boolean [LIM];
		for (i = 2;i<LIM; ++i) if (!b[i]) {count++; for (int j = i<<1; j<LIM; j+=i) b[j] = true;}
		int [] primes = new int[count];
		for (i = 2,count=0;i<LIM;++i) if (!b[i]) primes[count++] = i;
		return primes;
	}
	public static int[] numPrimeFactors(int LIM) {
		int i,count = 0;
		int [] b = new int [LIM];
		for (i = 2;i<LIM; ++i) if (b[i] == 0) {count++; for (int j = i; j<LIM; j+=i) b[j]++;}
		return b;
	}
}

/* Full Problem Text:

n boys and m girls came to the party.
Each boy presented each girl some integer number of sweets (possibly zero).
All boys are numbered with integers from 1 to n and all girls are numbered with integers from 1 to m.
For all 1 <q i <q n the minimal number of sweets, which i-th boy presented to some girl is equal to b_i and for all 1 <q i <q m the maximal number of sweets, which i-th girl received from some boy is equal to g_i.
You are interested in the minimum total number of sweets that boys could present.
You are given the numbers b_1, ..., b_n and g_1, ..., g_m, determine this number.

 */


import java.util.*;

public class C {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[] arr1 = new int[n];
		int[] arr2 = new int[m];
		int max = -1;
		long counter = 0;
		int min = Integer.MAX_VALUE;
		for (int i = 0; i < n; i ++) {
			arr1[i] = sc.nextInt();
			max = Math.max(max, arr1[i]);
		}
		for (int i = 0; i < m; i ++) {
			arr2[i] = sc.nextInt();
			min = Math.min(min, arr2[i]);
		}
		if (max > min) {
			System.out.println(-1);
			System.exit(0);
		}
		Arrays.sort(arr1);
		Arrays.sort(arr2);

		if (n == 1) {
			if (arr2[0] != arr1[0]) {
				System.out.println(-1);
				System.exit(0);
			}
			else {
				for (int i = 0; i < m; i ++) {
					counter += arr2[i];
				}
				System.out.println(counter);
				System.exit(0);
			}
		}

		if (m == 1) {
			if (arr2[0] != arr1[n - 1]) {
				System.out.println(-1);
				System.exit(0);
			}
		}

		int[] arr = new int[n];
		for (int i = 0; i < n; i ++) {
			arr[i] = m;
		}

		for (int i = 0;i < m; i ++) {
			counter += arr2[i];
		}

		int j = n - 1;
		for (int i = m - 1; i >= 0; i --) {
			if (arr1[j] <= arr2[i]) {
				arr[j] --;
			}
			else {
				j --;
			}
		}
		if (j == n - 1 && arr2[0] != arr1[n - 1]) {
					arr[n - 1] ++;
					arr[n - 2] --;
		}
		for (int i = 0; i < n; i ++) {
			counter += (arr1[i] * arr[i]);
		}
		System.out.println(counter);
	}
}


import java.util.*;

public class C {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[] arr1 = new int[n];
		int[] arr2 = new int[m];
		int max = -1;
		long counter = 0;
		int min = Integer.MAX_VALUE;
		for (int i = 0; i < n; i ++) {
			arr1[i] = sc.nextInt();
			max = Math.max(max, arr1[i]);
		}
		for (int i = 0; i < m; i ++) {
			arr2[i] = sc.nextInt();
			min = Math.min(min, arr2[i]);
		}
		if (max > min) {
			System.out.println(-1);
			System.exit(0);
		}
		Arrays.sort(arr1);
		Arrays.sort(arr2);

		if (n == 1) {
			if (arr2[0] != arr1[0]) {
				System.out.println(-1);
				System.exit(0);
			}
			else {
				for (int i = 0; i < m; i ++) {
					counter += arr2[i];
				}
				System.out.println(counter);
				System.exit(0);
			}
		}

		if (m == 1) {
			if (arr2[0] != arr1[n - 1]) {
				System.out.println(-1);
				System.exit(0);
			}
		}

		int[] arr = new int[n];
		for (int i = 0; i < n; i ++) {
			arr[i] = m;
		}

		for (int i = 0;i < m; i ++) {
			counter += arr2[i];
		}

		int j = n - 1;
		for (int i = m - 1; i >= 0; i --) {
			while (arr1[j] > arr2[i]) {
				j --;
			}
			if (arr1[j] <= arr2[i]) {
				arr[j] --;
			}
		}
		if (j == n - 1 && arr2[0] != arr1[n - 1]) {
					arr[n - 1] ++;
					arr[n - 2] --;
		}
		for (int i = 0; i < n; i ++) {
			counter += (arr1[i] * arr[i]);
		}
		System.out.println(counter);
	}
}


import java.util.*;

public class C {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[] arr1 = new int[n];
		int[] arr2 = new int[m];
		int max = -1;
		long counter = 0;
		int min = Integer.MAX_VALUE;
		for (int i = 0; i < n; i ++) {
			arr1[i] = sc.nextInt();
			max = Math.max(max, arr1[i]);
		}
		for (int i = 0; i < m; i ++) {
			arr2[i] = sc.nextInt();
			min = Math.min(min, arr2[i]);
		}
		if (max > min) {
			System.out.println(-1);
			System.exit(0);
		}
		Arrays.sort(arr1);
		Arrays.sort(arr2);

		if (n == 1) {
			if (arr2[0] != arr1[0]) {
				System.out.println(-1);
				System.exit(0);
			}
			else {
				for (int i = 0; i < m; i ++) {
					counter += arr2[i];
				}
				System.out.println(counter);
				System.exit(0);
			}
		}

		int[] arr = new int[n];
		for (int i = 0; i < n; i ++) {
			arr[i] = m;
		}
		int j = n - 1;
		for (int i = m - 1; i >= 0; i --) {
			if (arr1[j] <= arr2[i]) {
				counter += arr2[i];
				arr[j] --;
			}
			else {
				j --;
			}
		}
		if (j == n - 1 && arr2[0] != arr1[n - 1]) {
					arr[n - 1] ++;
					arr[n - 2] --;
		}
		for (int i = 0; i < n; i ++) {
			counter += (arr1[i] * arr[i]);
		}
		System.out.println(counter);
	}
}


import java.util.*;

public class C {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		long[] arr1 = new long[n];
		long[] arr2 = new long[m];
		long max = -1;
		long counter = 0;
		long min = Integer.MAX_VALUE;
		min *= 1000000;
		for (int i = 0; i < n; i ++) {
			arr1[i] = sc.nextInt();
			max = Math.max(max, arr1[i]);
		}
		for (int i = 0; i < m; i ++) {
			arr2[i] = sc.nextInt();
			min = Math.min(min, arr2[i]);
		}
		if (max > min) {
			System.out.println(-1);
			System.exit(0);
		}
		Arrays.sort(arr1);
		Arrays.sort(arr2);

		if (n == 1) {
			if (arr2[0] != arr1[0]) {
				System.out.println(-1);
				System.exit(0);
			}
			else {
				for (int i = 0; i < m; i ++) {
					counter += arr2[i];
				}
				System.out.println(counter);
				System.exit(0);
			}
		}

		if (m == 1) {
			if (arr2[0] != arr1[n - 1]) {
				System.out.println(-1);
				System.exit(0);
			}
		}

		int[] arr = new int[n];
		for (int i = 0; i < n; i ++) {
			arr[i] = m;
		}

		for (int i = 0;i < m; i ++) {
			counter += arr2[i];
		}

		int j = n - 1;
		for (int i = m - 1; i >= 0; i --) {
			while (arr1[j] > arr2[i]) {
				j --;
			}
			if (arr1[j] <= arr2[i]) {
				arr[j] --;
			}
		}
		if (j == n - 1 && arr2[0] != arr1[n - 1]) {
					arr[n - 1] ++;
					arr[n - 2] --;
		}
		for (int i = 0; i < n; i ++) {
			counter += (arr1[i] * arr[i]);
		}
		System.out.println(counter);
	}
}


import java.util.*;

public class C {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		long[] arr1 = new long[n];
		long[] arr2 = new long[m];
		long max = -1;
		long counter = 0;
		long min = Integer.MAX_VALUE;
		min *= 1000000;
		System.out.println(min);
		for (int i = 0; i < n; i ++) {
			arr1[i] = sc.nextInt();
			max = Math.max(max, arr1[i]);
		}
		for (int i = 0; i < m; i ++) {
			arr2[i] = sc.nextInt();
			min = Math.min(min, arr2[i]);
		}
		if (max > min) {
			System.out.println(-1);
			System.exit(0);
		}
		Arrays.sort(arr1);
		Arrays.sort(arr2);

		if (n == 1) {
			if (arr2[0] != arr1[0]) {
				System.out.println(-1);
				System.exit(0);
			}
			else {
				for (int i = 0; i < m; i ++) {
					counter += arr2[i];
				}
				System.out.println(counter);
				System.exit(0);
			}
		}

		if (m == 1) {
			if (arr2[0] != arr1[n - 1]) {
				System.out.println(-1);
				System.exit(0);
			}
		}

		int[] arr = new int[n];
		for (int i = 0; i < n; i ++) {
			arr[i] = m;
		}

		for (int i = 0;i < m; i ++) {
			counter += arr2[i];
		}

		int j = n - 1;
		for (int i = m - 1; i >= 0; i --) {
			while (arr1[j] > arr2[i]) {
				j --;
			}
			if (arr1[j] <= arr2[i]) {
				arr[j] --;
			}
		}
		if (j == n - 1 && arr2[0] != arr1[n - 1]) {
					arr[n - 1] ++;
					arr[n - 2] --;
		}
		for (int i = 0; i < n; i ++) {
			counter += (arr1[i] * arr[i]);
		}
		System.out.println(counter);
	}
}


import java.util.*;

import javax.lang.model.util.ElementScanner6;

import java.io.*;

public class Main{

    public static void main(String[] args) {

        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader inp = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solver solver = new Solver();
        solver.solve(inp, out);
        out.close();

        }

    static class Solver {

        class Node implements Comparable<Node>{
            int i;
            long c;

            Node(int i,long c)
            {
                this.i=i;
                this.c=c;

            }

        public int compareTo(Node n)
            {
                if(this.c==n.c)
                {
                    return Integer.compare(this.i, n.i);
                }
                return Long.compare(this.c, n.c);
            }
        }

        public boolean done(int[] sp,int[] par)
        {
            int root;

            root=findSet(sp[0],par);

        for(int i=1;i<sp.length;i++)
        {
                if(root!=findSet(sp[i], par))
                    return false;
        }
        return true;
        }
    public int findSet(int i,int[] par)
    {
        int x =i;
            boolean flag =false;
            while(par[i]>=0)
            {
                flag = true;
                i=par[i];
            }
            if(flag)
                par[x]=i;
            return i;
    }

    public void unionSet(int i,int j,int[] par)
    {
            int x = findSet(i, par);
            int y = findSet(j, par);
            if(x<y)
            {
                par[y]=x;
            }
            else
            {
                par[x]=y;
            }
    }

    public  long pow(long a, long b, long MOD) {
            if (b == 0) {
                return 1;
            }
            if (b == 1) {
                return a;
            }
            long val = pow(a, b / 2, MOD);
            if (b % 2 == 0) {
                return val * val % MOD;
            } else {
                return val * (val * a % MOD) % MOD;

            }

        }

        public void minPrimeFactor(int n,int[] s)
        {
            boolean prime[] = new boolean[n+1];
            Arrays.fill(prime, true);
            s[1]=1;
            s[2]=2;
            for(int i=4;i<=n;i+=2)
            {
                prime[i]=false;
                s[i]=2;
            }

            for(int i=3;i<=n;i+=2)
            {
                if(prime[i])
                {
                    s[i]=i;
                    for(int j=2*i;j<=n;j+=i)
                    {
                        prime[j]=false;
                        s[j]=i;
                    }
                }
            }

        }

        // public void findAllPrime(int n,ArrayList<Node> al,int s[])
        // {
        //     int curr = s[n];
        //     int cnt = 1;
        //     while(n>1)
        //     {
        //         n/=s[n];
        //         if(curr==s[n])
        //         {
        //             cnt++;
        //             continue;

        //         }
        //         Node n1 = new Node(curr,cnt);
        //         al.add(n1);

        //         curr=s[n];
        //         cnt=1;
        //     }
        // }

        public int binarySearch(int n,int k)
        {
            int left=1;
            int right=100000000+5;
            int ans=0;
            while(left<=right)
            {
                int mid = (left+right)/2;
                if(n/mid>=k)
                {
                    left = mid+1;
                    ans=mid;
                }
                else
                {
                    right=mid-1;
                }
            }

            return ans;
        }
        public boolean checkPallindrom(String s)
        {
            char ch[] = s.toCharArray();

            for(int i=0;i<s.length()/2;i++)
            {
                if(ch[i]!=ch[s.length()-1-i])
                    return false;
            }
            return true;
        }

        public void dfs_util(ArrayList<Integer>[] al,boolean vis[],int x,int cnt[],int sts[],int fts[],long sv[])
        {

            vis[x] = true;
            long min=Long.MAX_VALUE;
                sts[cnt[0]]=x+1;
                for(int i=0;i<al[x].size();i++)
                {

                    if(!vis[al[x].get(i)])
                    {
                        cnt[0]++;
                        dfs_util(al, vis, al[x].get(i),cnt,sts,fts,sv);
                        if(sv[al[x].get(i)]<min&&sv[al[x].get(i)]!=-1)
                        {
                            min=sv[al[x].get(i)];
                        }

                    }

                }

                if(sv[x]==-1)
                {
                    if(min==Long.MAX_VALUE)
                    {
                        min=-1;
                    }
                    sv[x]=min;
                }

            return ;
        }

        public void dfs(ArrayList[] al,int sts[],int fts[],long sv[])
        {

        boolean vis[] = new boolean[al.length];
        int cnt[]= new int[2*al.length+2];
        for(int i=0;i<al.length;i++)
        {
                if(!vis[i])
                {

                    dfs_util(al,vis,i,cnt,sts,fts,sv);
                }
        }
        }

        public void remove(ArrayList<Integer>[] al,int x)
        {
            for(int i=0;i<al.length;i++)
            {
                for(int j=0;j<al[i].size();j++)
                {

                    if(al[i].get(j)==x)
                        al[i].remove(j);

                }
            }
        }

        public int gcd(int a, int b)
        {
            if (a == 0)
                return b;
            return gcd(b % a, a);
        }

        public void printDivisors(int n,ArrayList<Integer> al)
        {
            // Note that this loop runs till square root
            for (int i=1; i<=Math.sqrt(n); i++)
            {
                if (n%i==0)
                {
                    // If divisors are equal, print only one
                    if (n/i == i)
                    {
                        al.add(i);
                    }

                    else // Otherwise print both
                    {
                        al.add(i);
                        al.add(n/i);
                    }

                }
            }
        }

        public static long constructSegment(long seg[],long arr[], int low,int high,int pos)
        {
            if(low==high)
            {
                seg[pos] = arr[low];
                return seg[pos];
            }
            int mid = (low+high)/2;
            long t1=constructSegment(seg, arr,low , mid,(2*pos)+1);
            long t2=constructSegment(seg,arr,mid+1,high,(2*pos)+2);
            seg[pos] = t1+t2;
            return seg[pos];

        }
        public static long querySegment(long seg[],int low,int high,int qlow, int qhigh,int pos)
        {

             if(qlow<=low&&qhigh>=high)
             {
                return seg[pos];
             }
             else if(qlow>high||qhigh<low )
             {
                 return 0;
             }
             else{
                long ans=0;
                int mid=(low+high)/2;
                ans+=querySegment(seg,low , mid, qlow, qhigh,  (2*pos)+1);
                ans+=querySegment(seg, mid+1, high, qlow, qhigh, (2*pos)+2);
               return ans;
             }

        }
        public static int lcs( char[] X, char[] Y, int m, int n )
        {
            if (m == 0 || n == 0)
            return 0;
            if (X[m-1] == Y[n-1])
            return 1 + lcs(X, Y, m-1, n-1);
            else
            return Integer.max(lcs(X, Y, m, n-1), lcs(X, Y, m-1, n));
        }

        public static long recursion(long start,long end,long cnt[],int a, int b)
        {

            long min=0;
            long count=0;
            int ans1=-1;
            int ans2=-1;
            int l=0;
            int r=cnt.length-1;
            while(l<=r)
            {
                int mid=(l+r)/2;
                if(cnt[mid]>=start)
                {
                    ans1=mid;
                    r=mid-1;
                }
                else
                {
                    l=mid+1;
                }
            }

            l=0;
            r=cnt.length-1;
            while(l<=r)
            {
                int mid=(l+r)/2;
                if(cnt[mid]<=end)
                {
                    ans2=mid;
                    l=mid+1;
                }
                else
                {
                    r=mid-1;
                }
            }

            if(ans1==-1||ans2==-1||ans2<ans1)
            {
                // System.out.println("min1 "+min);
                min=a;
                return a;

            }
            else
            {
                min=b*(end-start+1)*(ans2-ans1+1);
            }
            if(start==end)
            {
                // System.out.println("min "+min);
                return min;
            }
            long mid = (end+start)/2;
            min = Long.min(min,recursion(start, mid, cnt, a, b)+recursion(mid+1, end, cnt, a, b));
            // System.out.println("min "+min);
            return min;
        }

        public void dfs(int x, ArrayList<Integer> al[], boolean[] vis)
        {
            vis[x]=true;
            System.out.print((x+1)+" ");
            for(int i=0;i<al[x].size();i++)
            {
                if(!vis[al[x].get(i)])
                {
                    dfs(al[x].get(i),al,vis);
                }
            }
        }

        private void solve(InputReader inp, PrintWriter out1) {

           int n = inp.nextInt();
           int m = inp.nextInt();

           Long arr1[] = new Long[n];
           Long arr2[] = new Long[m];

           for(int i=0;i<n;i++)
            {
                arr1[i] = inp.nextLong();
            }
            for(int i=0;i<m;i++)
            {
                arr2[i]=inp.nextLong();
            }

           Arrays.sort(arr1,Collections.reverseOrder());
           Arrays.sort(arr2,Collections.reverseOrder());

           for(int k=0;k<m;k++)
           {
               if(arr2[k]<arr1[0])
               {
                   System.out.println(-1);
                   return;
               }
           }

            int count=0;
            int j=0;
            int i;
            long ans=0;
           for( i=0;i<n;i++)
           {
                count=0;
                while(arr2[j]>=arr1[i]&&count<m-1)
                {
                    ans+=arr2[j];
                    j++;
                    count++;
                    if(j>=m)
                    {
                        break;
                    }
                }
                if(j>=m)
                {
                    ans+=(m-count)*arr1[i];
                    i++;
                    // System.out.println("break "+i);
                    break;

                }
                if(arr2[j]==arr1[i])
                {

                    ans+=arr2[j];
                    j++;
                    if(j>=m)
                    {

                        i++;
                        // System.out.println("break "+i);
                        break;

                    }

                }
                else
                {
                    ans+=(m-count)*arr1[i];
                }
           }
        //    System.out.println("i "+i);
           for(int k=i;k<n;k++)
           {
               ans+=m*arr1[k];
           }

           System.out.println(ans);
        }
}

    static class InputReader {
        BufferedReader reader;
        StringTokenizer tokenizer;

        InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

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

        public long nextLong() {
            return Long.parseLong(next());
        }
    }
}
class ele{
    long value;
    long i;
    boolean flag;
    public ele(long value,long i)
    {
        this.value = value;
        this.i=i;
        this.flag = false;
    }
}


import java.util.*;

import javax.lang.model.util.ElementScanner6;

import java.io.*;

public class Main{

    public static void main(String[] args) {

        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader inp = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solver solver = new Solver();
        solver.solve(inp, out);
        out.close();

        }

    static class Solver {

        class Node implements Comparable<Node>{
            int i;
            long c;

            Node(int i,long c)
            {
                this.i=i;
                this.c=c;

            }

        public int compareTo(Node n)
            {
                if(this.c==n.c)
                {
                    return Integer.compare(this.i, n.i);
                }
                return Long.compare(this.c, n.c);
            }
        }

        public boolean done(int[] sp,int[] par)
        {
            int root;

            root=findSet(sp[0],par);

        for(int i=1;i<sp.length;i++)
        {
                if(root!=findSet(sp[i], par))
                    return false;
        }
        return true;
        }
    public int findSet(int i,int[] par)
    {
        int x =i;
            boolean flag =false;
            while(par[i]>=0)
            {
                flag = true;
                i=par[i];
            }
            if(flag)
                par[x]=i;
            return i;
    }

    public void unionSet(int i,int j,int[] par)
    {
            int x = findSet(i, par);
            int y = findSet(j, par);
            if(x<y)
            {
                par[y]=x;
            }
            else
            {
                par[x]=y;
            }
    }

    public  long pow(long a, long b, long MOD) {
            if (b == 0) {
                return 1;
            }
            if (b == 1) {
                return a;
            }
            long val = pow(a, b / 2, MOD);
            if (b % 2 == 0) {
                return val * val % MOD;
            } else {
                return val * (val * a % MOD) % MOD;

            }

        }

        public void minPrimeFactor(int n,int[] s)
        {
            boolean prime[] = new boolean[n+1];
            Arrays.fill(prime, true);
            s[1]=1;
            s[2]=2;
            for(int i=4;i<=n;i+=2)
            {
                prime[i]=false;
                s[i]=2;
            }

            for(int i=3;i<=n;i+=2)
            {
                if(prime[i])
                {
                    s[i]=i;
                    for(int j=2*i;j<=n;j+=i)
                    {
                        prime[j]=false;
                        s[j]=i;
                    }
                }
            }

        }

        // public void findAllPrime(int n,ArrayList<Node> al,int s[])
        // {
        //     int curr = s[n];
        //     int cnt = 1;
        //     while(n>1)
        //     {
        //         n/=s[n];
        //         if(curr==s[n])
        //         {
        //             cnt++;
        //             continue;

        //         }
        //         Node n1 = new Node(curr,cnt);
        //         al.add(n1);

        //         curr=s[n];
        //         cnt=1;
        //     }
        // }

        public int binarySearch(int n,int k)
        {
            int left=1;
            int right=100000000+5;
            int ans=0;
            while(left<=right)
            {
                int mid = (left+right)/2;
                if(n/mid>=k)
                {
                    left = mid+1;
                    ans=mid;
                }
                else
                {
                    right=mid-1;
                }
            }

            return ans;
        }
        public boolean checkPallindrom(String s)
        {
            char ch[] = s.toCharArray();

            for(int i=0;i<s.length()/2;i++)
            {
                if(ch[i]!=ch[s.length()-1-i])
                    return false;
            }
            return true;
        }

        public void dfs_util(ArrayList<Integer>[] al,boolean vis[],int x,int cnt[],int sts[],int fts[],long sv[])
        {

            vis[x] = true;
            long min=Long.MAX_VALUE;
                sts[cnt[0]]=x+1;
                for(int i=0;i<al[x].size();i++)
                {

                    if(!vis[al[x].get(i)])
                    {
                        cnt[0]++;
                        dfs_util(al, vis, al[x].get(i),cnt,sts,fts,sv);
                        if(sv[al[x].get(i)]<min&&sv[al[x].get(i)]!=-1)
                        {
                            min=sv[al[x].get(i)];
                        }

                    }

                }

                if(sv[x]==-1)
                {
                    if(min==Long.MAX_VALUE)
                    {
                        min=-1;
                    }
                    sv[x]=min;
                }

            return ;
        }

        public void dfs(ArrayList[] al,int sts[],int fts[],long sv[])
        {

        boolean vis[] = new boolean[al.length];
        int cnt[]= new int[2*al.length+2];
        for(int i=0;i<al.length;i++)
        {
                if(!vis[i])
                {

                    dfs_util(al,vis,i,cnt,sts,fts,sv);
                }
        }
        }

        public void remove(ArrayList<Integer>[] al,int x)
        {
            for(int i=0;i<al.length;i++)
            {
                for(int j=0;j<al[i].size();j++)
                {

                    if(al[i].get(j)==x)
                        al[i].remove(j);

                }
            }
        }

        public int gcd(int a, int b)
        {
            if (a == 0)
                return b;
            return gcd(b % a, a);
        }

        public void printDivisors(int n,ArrayList<Integer> al)
        {
            // Note that this loop runs till square root
            for (int i=1; i<=Math.sqrt(n); i++)
            {
                if (n%i==0)
                {
                    // If divisors are equal, print only one
                    if (n/i == i)
                    {
                        al.add(i);
                    }

                    else // Otherwise print both
                    {
                        al.add(i);
                        al.add(n/i);
                    }

                }
            }
        }

        public static long constructSegment(long seg[],long arr[], int low,int high,int pos)
        {
            if(low==high)
            {
                seg[pos] = arr[low];
                return seg[pos];
            }
            int mid = (low+high)/2;
            long t1=constructSegment(seg, arr,low , mid,(2*pos)+1);
            long t2=constructSegment(seg,arr,mid+1,high,(2*pos)+2);
            seg[pos] = t1+t2;
            return seg[pos];

        }
        public static long querySegment(long seg[],int low,int high,int qlow, int qhigh,int pos)
        {

             if(qlow<=low&&qhigh>=high)
             {
                return seg[pos];
             }
             else if(qlow>high||qhigh<low )
             {
                 return 0;
             }
             else{
                long ans=0;
                int mid=(low+high)/2;
                ans+=querySegment(seg,low , mid, qlow, qhigh,  (2*pos)+1);
                ans+=querySegment(seg, mid+1, high, qlow, qhigh, (2*pos)+2);
               return ans;
             }

        }
        public static int lcs( char[] X, char[] Y, int m, int n )
        {
            if (m == 0 || n == 0)
            return 0;
            if (X[m-1] == Y[n-1])
            return 1 + lcs(X, Y, m-1, n-1);
            else
            return Integer.max(lcs(X, Y, m, n-1), lcs(X, Y, m-1, n));
        }

        public static long recursion(long start,long end,long cnt[],int a, int b)
        {

            long min=0;
            long count=0;
            int ans1=-1;
            int ans2=-1;
            int l=0;
            int r=cnt.length-1;
            while(l<=r)
            {
                int mid=(l+r)/2;
                if(cnt[mid]>=start)
                {
                    ans1=mid;
                    r=mid-1;
                }
                else
                {
                    l=mid+1;
                }
            }

            l=0;
            r=cnt.length-1;
            while(l<=r)
            {
                int mid=(l+r)/2;
                if(cnt[mid]<=end)
                {
                    ans2=mid;
                    l=mid+1;
                }
                else
                {
                    r=mid-1;
                }
            }

            if(ans1==-1||ans2==-1||ans2<ans1)
            {
                // System.out.println("min1 "+min);
                min=a;
                return a;

            }
            else
            {
                min=b*(end-start+1)*(ans2-ans1+1);
            }
            if(start==end)
            {
                // System.out.println("min "+min);
                return min;
            }
            long mid = (end+start)/2;
            min = Long.min(min,recursion(start, mid, cnt, a, b)+recursion(mid+1, end, cnt, a, b));
            // System.out.println("min "+min);
            return min;
        }

        public void dfs(int x, ArrayList<Integer> al[], boolean[] vis)
        {
            vis[x]=true;
            System.out.print((x+1)+" ");
            for(int i=0;i<al[x].size();i++)
            {
                if(!vis[al[x].get(i)])
                {
                    dfs(al[x].get(i),al,vis);
                }
            }
        }

        private void solve(InputReader inp, PrintWriter out1) {

           int n = inp.nextInt();
           int m = inp.nextInt();

           Long arr1[] = new Long[n];
           Long arr2[] = new Long[m];

           for(int i=0;i<n;i++)
            {
                arr1[i] = inp.nextLong();
            }
            for(int i=0;i<m;i++)
            {
                arr2[i]=inp.nextLong();
            }

           Arrays.sort(arr1,Collections.reverseOrder());
           Arrays.sort(arr2,Collections.reverseOrder());

           for(int k=0;k<m;k++)
           {
               if(arr2[k]<arr1[0])
               {
                   System.out.println(-1);
                   return;
               }
           }

            long count=0;
            int j=0;
            int i=0;
            long ans=0;
           for( i=0;i<n;i++)
           {
                count=0;
                while(arr2[j]>=arr1[i]&&count<m-1)
                {
                    ans+=arr2[j];
                    j++;
                    count++;
                    if(j>=m)
                    {
                        break;
                    }
                }
                if(j>=m)
                {
                    ans+=((long)m-count)*arr1[i];
                    i++;
                    break;

                }
                if(arr2[j]==arr1[i])
                {

                    ans+=arr2[j];
                    j++;
                    if(j>=m)
                    {

                        i++;
                        break;

                    }

                }
                else
                {
                    ans+=((long)m-count)*arr1[i];
                }
           }
           for(int k=i;k<n;k++)
           {
               ans+=((long)m)*arr1[k];
           }

           System.out.println(ans);
        }
}

    static class InputReader {
        BufferedReader reader;
        StringTokenizer tokenizer;

        InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

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

        public long nextLong() {
            return Long.parseLong(next());
        }
    }
}
class ele{
    long value;
    long i;
    boolean flag;
    public ele(long value,long i)
    {
        this.value = value;
        this.i=i;
        this.flag = false;
    }
}


import java.util.*;

import javax.lang.model.util.ElementScanner6;

import java.io.*;

public class Main{

    public static void main(String[] args) {

        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader inp = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solver solver = new Solver();
        solver.solve(inp, out);
        out.close();

        }

    static class Solver {

        class Node implements Comparable<Node>{
            int i;
            long c;

            Node(int i,long c)
            {
                this.i=i;
                this.c=c;

            }

        public int compareTo(Node n)
            {
                if(this.c==n.c)
                {
                    return Integer.compare(this.i, n.i);
                }
                return Long.compare(this.c, n.c);
            }
        }

        public boolean done(int[] sp,int[] par)
        {
            int root;

            root=findSet(sp[0],par);

        for(int i=1;i<sp.length;i++)
        {
                if(root!=findSet(sp[i], par))
                    return false;
        }
        return true;
        }
    public int findSet(int i,int[] par)
    {
        int x =i;
            boolean flag =false;
            while(par[i]>=0)
            {
                flag = true;
                i=par[i];
            }
            if(flag)
                par[x]=i;
            return i;
    }

    public void unionSet(int i,int j,int[] par)
    {
            int x = findSet(i, par);
            int y = findSet(j, par);
            if(x<y)
            {
                par[y]=x;
            }
            else
            {
                par[x]=y;
            }
    }

    public  long pow(long a, long b, long MOD) {
            if (b == 0) {
                return 1;
            }
            if (b == 1) {
                return a;
            }
            long val = pow(a, b / 2, MOD);
            if (b % 2 == 0) {
                return val * val % MOD;
            } else {
                return val * (val * a % MOD) % MOD;

            }

        }

        public void minPrimeFactor(int n,int[] s)
        {
            boolean prime[] = new boolean[n+1];
            Arrays.fill(prime, true);
            s[1]=1;
            s[2]=2;
            for(int i=4;i<=n;i+=2)
            {
                prime[i]=false;
                s[i]=2;
            }

            for(int i=3;i<=n;i+=2)
            {
                if(prime[i])
                {
                    s[i]=i;
                    for(int j=2*i;j<=n;j+=i)
                    {
                        prime[j]=false;
                        s[j]=i;
                    }
                }
            }

        }

        // public void findAllPrime(int n,ArrayList<Node> al,int s[])
        // {
        //     int curr = s[n];
        //     int cnt = 1;
        //     while(n>1)
        //     {
        //         n/=s[n];
        //         if(curr==s[n])
        //         {
        //             cnt++;
        //             continue;

        //         }
        //         Node n1 = new Node(curr,cnt);
        //         al.add(n1);

        //         curr=s[n];
        //         cnt=1;
        //     }
        // }

        public int binarySearch(int n,int k)
        {
            int left=1;
            int right=100000000+5;
            int ans=0;
            while(left<=right)
            {
                int mid = (left+right)/2;
                if(n/mid>=k)
                {
                    left = mid+1;
                    ans=mid;
                }
                else
                {
                    right=mid-1;
                }
            }

            return ans;
        }
        public boolean checkPallindrom(String s)
        {
            char ch[] = s.toCharArray();

            for(int i=0;i<s.length()/2;i++)
            {
                if(ch[i]!=ch[s.length()-1-i])
                    return false;
            }
            return true;
        }

        public void dfs_util(ArrayList<Integer>[] al,boolean vis[],int x,int cnt[],int sts[],int fts[],long sv[])
        {

            vis[x] = true;
            long min=Long.MAX_VALUE;
                sts[cnt[0]]=x+1;
                for(int i=0;i<al[x].size();i++)
                {

                    if(!vis[al[x].get(i)])
                    {
                        cnt[0]++;
                        dfs_util(al, vis, al[x].get(i),cnt,sts,fts,sv);
                        if(sv[al[x].get(i)]<min&&sv[al[x].get(i)]!=-1)
                        {
                            min=sv[al[x].get(i)];
                        }

                    }

                }

                if(sv[x]==-1)
                {
                    if(min==Long.MAX_VALUE)
                    {
                        min=-1;
                    }
                    sv[x]=min;
                }

            return ;
        }

        public void dfs(ArrayList[] al,int sts[],int fts[],long sv[])
        {

        boolean vis[] = new boolean[al.length];
        int cnt[]= new int[2*al.length+2];
        for(int i=0;i<al.length;i++)
        {
                if(!vis[i])
                {

                    dfs_util(al,vis,i,cnt,sts,fts,sv);
                }
        }
        }

        public void remove(ArrayList<Integer>[] al,int x)
        {
            for(int i=0;i<al.length;i++)
            {
                for(int j=0;j<al[i].size();j++)
                {

                    if(al[i].get(j)==x)
                        al[i].remove(j);

                }
            }
        }

        public int gcd(int a, int b)
        {
            if (a == 0)
                return b;
            return gcd(b % a, a);
        }

        public void printDivisors(int n,ArrayList<Integer> al)
        {
            // Note that this loop runs till square root
            for (int i=1; i<=Math.sqrt(n); i++)
            {
                if (n%i==0)
                {
                    // If divisors are equal, print only one
                    if (n/i == i)
                    {
                        al.add(i);
                    }

                    else // Otherwise print both
                    {
                        al.add(i);
                        al.add(n/i);
                    }

                }
            }
        }

        public static long constructSegment(long seg[],long arr[], int low,int high,int pos)
        {
            if(low==high)
            {
                seg[pos] = arr[low];
                return seg[pos];
            }
            int mid = (low+high)/2;
            long t1=constructSegment(seg, arr,low , mid,(2*pos)+1);
            long t2=constructSegment(seg,arr,mid+1,high,(2*pos)+2);
            seg[pos] = t1+t2;
            return seg[pos];

        }
        public static long querySegment(long seg[],int low,int high,int qlow, int qhigh,int pos)
        {

             if(qlow<=low&&qhigh>=high)
             {
                return seg[pos];
             }
             else if(qlow>high||qhigh<low )
             {
                 return 0;
             }
             else{
                long ans=0;
                int mid=(low+high)/2;
                ans+=querySegment(seg,low , mid, qlow, qhigh,  (2*pos)+1);
                ans+=querySegment(seg, mid+1, high, qlow, qhigh, (2*pos)+2);
               return ans;
             }

        }
        public static int lcs( char[] X, char[] Y, int m, int n )
        {
            if (m == 0 || n == 0)
            return 0;
            if (X[m-1] == Y[n-1])
            return 1 + lcs(X, Y, m-1, n-1);
            else
            return Integer.max(lcs(X, Y, m, n-1), lcs(X, Y, m-1, n));
        }

        public static long recursion(long start,long end,long cnt[],int a, int b)
        {

            long min=0;
            long count=0;
            int ans1=-1;
            int ans2=-1;
            int l=0;
            int r=cnt.length-1;
            while(l<=r)
            {
                int mid=(l+r)/2;
                if(cnt[mid]>=start)
                {
                    ans1=mid;
                    r=mid-1;
                }
                else
                {
                    l=mid+1;
                }
            }

            l=0;
            r=cnt.length-1;
            while(l<=r)
            {
                int mid=(l+r)/2;
                if(cnt[mid]<=end)
                {
                    ans2=mid;
                    l=mid+1;
                }
                else
                {
                    r=mid-1;
                }
            }

            if(ans1==-1||ans2==-1||ans2<ans1)
            {
                // System.out.println("min1 "+min);
                min=a;
                return a;

            }
            else
            {
                min=b*(end-start+1)*(ans2-ans1+1);
            }
            if(start==end)
            {
                // System.out.println("min "+min);
                return min;
            }
            long mid = (end+start)/2;
            min = Long.min(min,recursion(start, mid, cnt, a, b)+recursion(mid+1, end, cnt, a, b));
            // System.out.println("min "+min);
            return min;
        }

        public void dfs(int x, ArrayList<Integer> al[], boolean[] vis)
        {
            vis[x]=true;
            System.out.print((x+1)+" ");
            for(int i=0;i<al[x].size();i++)
            {
                if(!vis[al[x].get(i)])
                {
                    dfs(al[x].get(i),al,vis);
                }
            }
        }

        private void solve(InputReader inp, PrintWriter out1) {

           int n = inp.nextInt();
           int m = inp.nextInt();

           Long arr1[] = new Long[n];
           Long arr2[] = new Long[m];

           for(int i=0;i<n;i++)
            {
                arr1[i] = inp.nextLong();
            }
            for(int i=0;i<m;i++)
            {
                arr2[i]=inp.nextLong();
            }

           Arrays.sort(arr1,Collections.reverseOrder());
           Arrays.sort(arr2,Collections.reverseOrder());

           for(int k=0;k<m;k++)
           {
               if(arr2[k]<arr1[0])
               {
                   System.out.println(-1);
                   return;
               }
           }

            long count=0;
            int j=0;
            int i=0;
            long ans=0;
           for( i=0;i<n;i++)
           {
                count=0;
                while(arr2[j]>=arr1[i]&&count<m-1)
                {
                    ans+=arr2[j];
                    j++;
                    count++;
                    if(j>=m)
                    {
                        break;
                    }
                }
                if(j>=m)
                {
                    ans+=((long)m-count)*arr1[i];
                    i++;
                    break;

                }
                if(arr2[j].equals(arr1[i]))
                {

                    ans+=arr2[j];
                    j++;
                    if(j>=m)
                    {

                        i++;
                        break;

                    }

                }
                else
                {
                    ans+=((long)m-count)*arr1[i];
                }
           }
           for(int k=i;k<n;k++)
           {
               ans+=((long)m)*arr1[k];
           }

           System.out.println(ans);
        }
}

    static class InputReader {
        BufferedReader reader;
        StringTokenizer tokenizer;

        InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

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

        public long nextLong() {
            return Long.parseLong(next());
        }
    }
}
class ele{
    long value;
    long i;
    boolean flag;
    public ele(long value,long i)
    {
        this.value = value;
        this.i=i;
        this.flag = false;
    }
}


import java.util.*;

import javax.lang.model.util.ElementScanner6;

import java.io.*;

public class Main{

    public static void main(String[] args) {

        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader inp = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solver solver = new Solver();
        solver.solve(inp, out);
        out.close();

        }

    static class Solver {

        class Node implements Comparable<Node>{
            int i;
            long c;

            Node(int i,long c)
            {
                this.i=i;
                this.c=c;

            }

        public int compareTo(Node n)
            {
                if(this.c==n.c)
                {
                    return Integer.compare(this.i, n.i);
                }
                return Long.compare(this.c, n.c);
            }
        }

        public boolean done(int[] sp,int[] par)
        {
            int root;

            root=findSet(sp[0],par);

        for(int i=1;i<sp.length;i++)
        {
                if(root!=findSet(sp[i], par))
                    return false;
        }
        return true;
        }
    public int findSet(int i,int[] par)
    {
        int x =i;
            boolean flag =false;
            while(par[i]>=0)
            {
                flag = true;
                i=par[i];
            }
            if(flag)
                par[x]=i;
            return i;
    }

    public void unionSet(int i,int j,int[] par)
    {
            int x = findSet(i, par);
            int y = findSet(j, par);
            if(x<y)
            {
                par[y]=x;
            }
            else
            {
                par[x]=y;
            }
    }

    public  long pow(long a, long b, long MOD) {
            if (b == 0) {
                return 1;
            }
            if (b == 1) {
                return a;
            }
            long val = pow(a, b / 2, MOD);
            if (b % 2 == 0) {
                return val * val % MOD;
            } else {
                return val * (val * a % MOD) % MOD;

            }

        }

        public void minPrimeFactor(int n,int[] s)
        {
            boolean prime[] = new boolean[n+1];
            Arrays.fill(prime, true);
            s[1]=1;
            s[2]=2;
            for(int i=4;i<=n;i+=2)
            {
                prime[i]=false;
                s[i]=2;
            }

            for(int i=3;i<=n;i+=2)
            {
                if(prime[i])
                {
                    s[i]=i;
                    for(int j=2*i;j<=n;j+=i)
                    {
                        prime[j]=false;
                        s[j]=i;
                    }
                }
            }

        }

        // public void findAllPrime(int n,ArrayList<Node> al,int s[])
        // {
        //     int curr = s[n];
        //     int cnt = 1;
        //     while(n>1)
        //     {
        //         n/=s[n];
        //         if(curr==s[n])
        //         {
        //             cnt++;
        //             continue;

        //         }
        //         Node n1 = new Node(curr,cnt);
        //         al.add(n1);

        //         curr=s[n];
        //         cnt=1;
        //     }
        // }

        public int binarySearch(int n,int k)
        {
            int left=1;
            int right=100000000+5;
            int ans=0;
            while(left<=right)
            {
                int mid = (left+right)/2;
                if(n/mid>=k)
                {
                    left = mid+1;
                    ans=mid;
                }
                else
                {
                    right=mid-1;
                }
            }

            return ans;
        }
        public boolean checkPallindrom(String s)
        {
            char ch[] = s.toCharArray();

            for(int i=0;i<s.length()/2;i++)
            {
                if(ch[i]!=ch[s.length()-1-i])
                    return false;
            }
            return true;
        }

        public void dfs_util(ArrayList<Integer>[] al,boolean vis[],int x,int cnt[],int sts[],int fts[],long sv[])
        {

            vis[x] = true;
            long min=Long.MAX_VALUE;
                sts[cnt[0]]=x+1;
                for(int i=0;i<al[x].size();i++)
                {

                    if(!vis[al[x].get(i)])
                    {
                        cnt[0]++;
                        dfs_util(al, vis, al[x].get(i),cnt,sts,fts,sv);
                        if(sv[al[x].get(i)]<min&&sv[al[x].get(i)]!=-1)
                        {
                            min=sv[al[x].get(i)];
                        }

                    }

                }

                if(sv[x]==-1)
                {
                    if(min==Long.MAX_VALUE)
                    {
                        min=-1;
                    }
                    sv[x]=min;
                }

            return ;
        }

        public void dfs(ArrayList[] al,int sts[],int fts[],long sv[])
        {

        boolean vis[] = new boolean[al.length];
        int cnt[]= new int[2*al.length+2];
        for(int i=0;i<al.length;i++)
        {
                if(!vis[i])
                {

                    dfs_util(al,vis,i,cnt,sts,fts,sv);
                }
        }
        }

        public void remove(ArrayList<Integer>[] al,int x)
        {
            for(int i=0;i<al.length;i++)
            {
                for(int j=0;j<al[i].size();j++)
                {

                    if(al[i].get(j)==x)
                        al[i].remove(j);

                }
            }
        }

        public int gcd(int a, int b)
        {
            if (a == 0)
                return b;
            return gcd(b % a, a);
        }

        public void printDivisors(int n,ArrayList<Integer> al)
        {
            // Note that this loop runs till square root
            for (int i=1; i<=Math.sqrt(n); i++)
            {
                if (n%i==0)
                {
                    // If divisors are equal, print only one
                    if (n/i == i)
                    {
                        al.add(i);
                    }

                    else // Otherwise print both
                    {
                        al.add(i);
                        al.add(n/i);
                    }

                }
            }
        }

        public static long constructSegment(long seg[],long arr[], int low,int high,int pos)
        {
            if(low==high)
            {
                seg[pos] = arr[low];
                return seg[pos];
            }
            int mid = (low+high)/2;
            long t1=constructSegment(seg, arr,low , mid,(2*pos)+1);
            long t2=constructSegment(seg,arr,mid+1,high,(2*pos)+2);
            seg[pos] = t1+t2;
            return seg[pos];

        }
        public static long querySegment(long seg[],int low,int high,int qlow, int qhigh,int pos)
        {

             if(qlow<=low&&qhigh>=high)
             {
                return seg[pos];
             }
             else if(qlow>high||qhigh<low )
             {
                 return 0;
             }
             else{
                long ans=0;
                int mid=(low+high)/2;
                ans+=querySegment(seg,low , mid, qlow, qhigh,  (2*pos)+1);
                ans+=querySegment(seg, mid+1, high, qlow, qhigh, (2*pos)+2);
               return ans;
             }

        }
        public static int lcs( char[] X, char[] Y, int m, int n )
        {
            if (m == 0 || n == 0)
            return 0;
            if (X[m-1] == Y[n-1])
            return 1 + lcs(X, Y, m-1, n-1);
            else
            return Integer.max(lcs(X, Y, m, n-1), lcs(X, Y, m-1, n));
        }

        public static long recursion(long start,long end,long cnt[],int a, int b)
        {

            long min=0;
            long count=0;
            int ans1=-1;
            int ans2=-1;
            int l=0;
            int r=cnt.length-1;
            while(l<=r)
            {
                int mid=(l+r)/2;
                if(cnt[mid]>=start)
                {
                    ans1=mid;
                    r=mid-1;
                }
                else
                {
                    l=mid+1;
                }
            }

            l=0;
            r=cnt.length-1;
            while(l<=r)
            {
                int mid=(l+r)/2;
                if(cnt[mid]<=end)
                {
                    ans2=mid;
                    l=mid+1;
                }
                else
                {
                    r=mid-1;
                }
            }

            if(ans1==-1||ans2==-1||ans2<ans1)
            {
                // System.out.println("min1 "+min);
                min=a;
                return a;

            }
            else
            {
                min=b*(end-start+1)*(ans2-ans1+1);
            }
            if(start==end)
            {
                // System.out.println("min "+min);
                return min;
            }
            long mid = (end+start)/2;
            min = Long.min(min,recursion(start, mid, cnt, a, b)+recursion(mid+1, end, cnt, a, b));
            // System.out.println("min "+min);
            return min;
        }

        public void dfs(int x, ArrayList<Integer> al[], boolean[] vis)
        {
            vis[x]=true;
            System.out.print((x+1)+" ");
            for(int i=0;i<al[x].size();i++)
            {
                if(!vis[al[x].get(i)])
                {
                    dfs(al[x].get(i),al,vis);
                }
            }
        }

        private void solve(InputReader inp, PrintWriter out1) {

           int n = inp.nextInt();
           int m = inp.nextInt();

           Long arr1[] = new Long[n];
           Long arr2[] = new Long[m];

           for(int i=0;i<n;i++)
            {
                arr1[i] = inp.nextLong();
            }
            for(int i=0;i<m;i++)
            {
                arr2[i]=inp.nextLong();
            }

           Arrays.sort(arr1,Collections.reverseOrder());
           Arrays.sort(arr2,Collections.reverseOrder());

           for(int k=0;k<m;k++)
           {
               if(arr2[k]<arr1[0])
               {
                   System.out.println(-1);
                   return;
               }
           }

            int count=0;
            int j=0;
            int i;
            long ans=0;
           for( i=0;i<n;i++)
           {
                count=0;
                while(arr2[j]>=arr1[i]&&count<m-1)
                {
                    ans+=arr2[j];
                    j++;
                    count++;
                    if(j>=m)
                    {
                        break;
                    }
                }
                if(j>=m)
                {
                    ans+=(m-count)*arr1[i];
                    i++;
                    break;

                }
                if(arr2[j]==arr1[i])
                {

                    ans+=arr2[j];
                    j++;
                    if(j>=m)
                    {

                        i++;
                        break;

                    }

                }
                else
                {
                    ans+=(m-count)*arr1[i];
                }
           }
           for(int k=i;k<n;k++)
           {
               ans+=m*arr1[i];
           }

           System.out.println(ans);
        }
}

    static class InputReader {
        BufferedReader reader;
        StringTokenizer tokenizer;

        InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

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

        public long nextLong() {
            return Long.parseLong(next());
        }
    }
}
class ele{
    long value;
    long i;
    boolean flag;
    public ele(long value,long i)
    {
        this.value = value;
        this.i=i;
        this.flag = false;
    }
}


import java.util.*;

import javax.lang.model.util.ElementScanner6;

import java.io.*;

public class Main{

    public static void main(String[] args) {

        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader inp = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solver solver = new Solver();
        solver.solve(inp, out);
        out.close();

        }

    static class Solver {

        class Node implements Comparable<Node>{
            int i;
            long c;

            Node(int i,long c)
            {
                this.i=i;
                this.c=c;

            }

        public int compareTo(Node n)
            {
                if(this.c==n.c)
                {
                    return Integer.compare(this.i, n.i);
                }
                return Long.compare(this.c, n.c);
            }
        }

        public boolean done(int[] sp,int[] par)
        {
            int root;

            root=findSet(sp[0],par);

        for(int i=1;i<sp.length;i++)
        {
                if(root!=findSet(sp[i], par))
                    return false;
        }
        return true;
        }
    public int findSet(int i,int[] par)
    {
        int x =i;
            boolean flag =false;
            while(par[i]>=0)
            {
                flag = true;
                i=par[i];
            }
            if(flag)
                par[x]=i;
            return i;
    }

    public void unionSet(int i,int j,int[] par)
    {
            int x = findSet(i, par);
            int y = findSet(j, par);
            if(x<y)
            {
                par[y]=x;
            }
            else
            {
                par[x]=y;
            }
    }

    public  long pow(long a, long b, long MOD) {
            if (b == 0) {
                return 1;
            }
            if (b == 1) {
                return a;
            }
            long val = pow(a, b / 2, MOD);
            if (b % 2 == 0) {
                return val * val % MOD;
            } else {
                return val * (val * a % MOD) % MOD;

            }

        }

        public void minPrimeFactor(int n,int[] s)
        {
            boolean prime[] = new boolean[n+1];
            Arrays.fill(prime, true);
            s[1]=1;
            s[2]=2;
            for(int i=4;i<=n;i+=2)
            {
                prime[i]=false;
                s[i]=2;
            }

            for(int i=3;i<=n;i+=2)
            {
                if(prime[i])
                {
                    s[i]=i;
                    for(int j=2*i;j<=n;j+=i)
                    {
                        prime[j]=false;
                        s[j]=i;
                    }
                }
            }

        }

        // public void findAllPrime(int n,ArrayList<Node> al,int s[])
        // {
        //     int curr = s[n];
        //     int cnt = 1;
        //     while(n>1)
        //     {
        //         n/=s[n];
        //         if(curr==s[n])
        //         {
        //             cnt++;
        //             continue;

        //         }
        //         Node n1 = new Node(curr,cnt);
        //         al.add(n1);

        //         curr=s[n];
        //         cnt=1;
        //     }
        // }

        public int binarySearch(int n,int k)
        {
            int left=1;
            int right=100000000+5;
            int ans=0;
            while(left<=right)
            {
                int mid = (left+right)/2;
                if(n/mid>=k)
                {
                    left = mid+1;
                    ans=mid;
                }
                else
                {
                    right=mid-1;
                }
            }

            return ans;
        }
        public boolean checkPallindrom(String s)
        {
            char ch[] = s.toCharArray();

            for(int i=0;i<s.length()/2;i++)
            {
                if(ch[i]!=ch[s.length()-1-i])
                    return false;
            }
            return true;
        }

        public void dfs_util(ArrayList<Integer>[] al,boolean vis[],int x,int cnt[],int sts[],int fts[],long sv[])
        {

            vis[x] = true;
            long min=Long.MAX_VALUE;
                sts[cnt[0]]=x+1;
                for(int i=0;i<al[x].size();i++)
                {

                    if(!vis[al[x].get(i)])
                    {
                        cnt[0]++;
                        dfs_util(al, vis, al[x].get(i),cnt,sts,fts,sv);
                        if(sv[al[x].get(i)]<min&&sv[al[x].get(i)]!=-1)
                        {
                            min=sv[al[x].get(i)];
                        }

                    }

                }

                if(sv[x]==-1)
                {
                    if(min==Long.MAX_VALUE)
                    {
                        min=-1;
                    }
                    sv[x]=min;
                }

            return ;
        }

        public void dfs(ArrayList[] al,int sts[],int fts[],long sv[])
        {

        boolean vis[] = new boolean[al.length];
        int cnt[]= new int[2*al.length+2];
        for(int i=0;i<al.length;i++)
        {
                if(!vis[i])
                {

                    dfs_util(al,vis,i,cnt,sts,fts,sv);
                }
        }
        }

        public void remove(ArrayList<Integer>[] al,int x)
        {
            for(int i=0;i<al.length;i++)
            {
                for(int j=0;j<al[i].size();j++)
                {

                    if(al[i].get(j)==x)
                        al[i].remove(j);

                }
            }
        }

        public int gcd(int a, int b)
        {
            if (a == 0)
                return b;
            return gcd(b % a, a);
        }

        public void printDivisors(int n,ArrayList<Integer> al)
        {
            // Note that this loop runs till square root
            for (int i=1; i<=Math.sqrt(n); i++)
            {
                if (n%i==0)
                {
                    // If divisors are equal, print only one
                    if (n/i == i)
                    {
                        al.add(i);
                    }

                    else // Otherwise print both
                    {
                        al.add(i);
                        al.add(n/i);
                    }

                }
            }
        }

        public static long constructSegment(long seg[],long arr[], int low,int high,int pos)
        {
            if(low==high)
            {
                seg[pos] = arr[low];
                return seg[pos];
            }
            int mid = (low+high)/2;
            long t1=constructSegment(seg, arr,low , mid,(2*pos)+1);
            long t2=constructSegment(seg,arr,mid+1,high,(2*pos)+2);
            seg[pos] = t1+t2;
            return seg[pos];

        }
        public static long querySegment(long seg[],int low,int high,int qlow, int qhigh,int pos)
        {

             if(qlow<=low&&qhigh>=high)
             {
                return seg[pos];
             }
             else if(qlow>high||qhigh<low )
             {
                 return 0;
             }
             else{
                long ans=0;
                int mid=(low+high)/2;
                ans+=querySegment(seg,low , mid, qlow, qhigh,  (2*pos)+1);
                ans+=querySegment(seg, mid+1, high, qlow, qhigh, (2*pos)+2);
               return ans;
             }

        }
        public static int lcs( char[] X, char[] Y, int m, int n )
        {
            if (m == 0 || n == 0)
            return 0;
            if (X[m-1] == Y[n-1])
            return 1 + lcs(X, Y, m-1, n-1);
            else
            return Integer.max(lcs(X, Y, m, n-1), lcs(X, Y, m-1, n));
        }

        public static long recursion(long start,long end,long cnt[],int a, int b)
        {

            long min=0;
            long count=0;
            int ans1=-1;
            int ans2=-1;
            int l=0;
            int r=cnt.length-1;
            while(l<=r)
            {
                int mid=(l+r)/2;
                if(cnt[mid]>=start)
                {
                    ans1=mid;
                    r=mid-1;
                }
                else
                {
                    l=mid+1;
                }
            }

            l=0;
            r=cnt.length-1;
            while(l<=r)
            {
                int mid=(l+r)/2;
                if(cnt[mid]<=end)
                {
                    ans2=mid;
                    l=mid+1;
                }
                else
                {
                    r=mid-1;
                }
            }

            if(ans1==-1||ans2==-1||ans2<ans1)
            {
                // System.out.println("min1 "+min);
                min=a;
                return a;

            }
            else
            {
                min=b*(end-start+1)*(ans2-ans1+1);
            }
            if(start==end)
            {
                // System.out.println("min "+min);
                return min;
            }
            long mid = (end+start)/2;
            min = Long.min(min,recursion(start, mid, cnt, a, b)+recursion(mid+1, end, cnt, a, b));
            // System.out.println("min "+min);
            return min;
        }

        public void dfs(int x, ArrayList<Integer> al[], boolean[] vis)
        {
            vis[x]=true;
            System.out.print((x+1)+" ");
            for(int i=0;i<al[x].size();i++)
            {
                if(!vis[al[x].get(i)])
                {
                    dfs(al[x].get(i),al,vis);
                }
            }
        }

        private void solve(InputReader inp, PrintWriter out1) {

           int n = inp.nextInt();
           int m = inp.nextInt();

           Long arr1[] = new Long[n];
           Long arr2[] = new Long[m];

           for(int i=0;i<n;i++)
            {
                arr1[i] = inp.nextLong();
            }
            for(int i=0;i<m;i++)
            {
                arr2[i]=inp.nextLong();
            }

           Arrays.sort(arr1,Collections.reverseOrder());
           Arrays.sort(arr2,Collections.reverseOrder());

           for(int k=0;k<m;k++)
           {
               if(arr2[k]<arr1[0])
               {
                   System.out.println(-1);
                   return;
               }
           }

            int count=0;
            int j=0;
            int i;
            long ans=0;
           for( i=0;i<n;i++)
           {
                count=0;
                while(arr2[j]>=arr1[i]&&count<m-1)
                {
                    ans+=arr2[j];
                    j++;
                    count++;
                    if(j>=m)
                    {
                        break;
                    }
                }
                if(j>=m)
                {
                    ans+=arr1[i];
                    i++;
                    break;

                }
                if(arr2[j]==arr1[i])
                {

                    ans+=arr2[j];
                    j++;
                    if(j>=m)
                    {

                        i++;
                        break;

                    }

                }
                else
                {
                    ans+=arr1[i];
                }
           }
           for(int k=i;k<n;k++)
           {
               ans+=m*arr1[i];
           }

           System.out.println(ans);
        }
}

    static class InputReader {
        BufferedReader reader;
        StringTokenizer tokenizer;

        InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

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

        public long nextLong() {
            return Long.parseLong(next());
        }
    }
}
class ele{
    long value;
    long i;
    boolean flag;
    public ele(long value,long i)
    {
        this.value = value;
        this.i=i;
        this.flag = false;
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main
{
	public static void main(String[] args)
	{
		FastReader fr =new FastReader();

		PrintWriter op =new PrintWriter(System.out);

		int n =fr.nextInt() , m =fr.nextInt() ,i ;
		long j =Long.MIN_VALUE ,k =Long.MAX_VALUE ,l =0 ;
		long ans =0 ;

		long[] b ,g ;

		byte f =0 ;

		b =new long[n] ;	g =new long[m] ;

		for (i =0; i<n; i++) {
			b[i] =(long)fr.nextInt() ;

			j =Math.max(j , b[i]) ;//has to give atleast this much
		}

		for (i=0;i<m ;i++ ) {
			g[i] =(long)fr.nextInt() ;	l += g[i] ;

			k =Math.min(k , g[i]) ;//can only receive this much
		}
		if(j > k)
			op.println("-1") ;
		else {
			for (i =0;i<n;i++) {
				if((b[i] == j)&&(f==0)) {
					ans += l ;	f=1 ;
				}
				else {
					ans += (b[i]*m) ;
				}
			}
			op.println(12);
		}

		op.flush();	op.close();
	}

	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

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

		String next() {
			while (st==null || (!st.hasMoreElements()))
			{
				try
				{
					st =new StringTokenizer(br.readLine());
				}
				catch(IOException e)
				{
					e.printStackTrace();
				}

			}
			return st.nextToken();
		}

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


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main
{
	public static void main(String[] args)
	{
		FastReader fr =new FastReader();

		PrintWriter op =new PrintWriter(System.out);

		int n =fr.nextInt() , m =fr.nextInt() ,i ;
		long j =Long.MIN_VALUE ,k =Long.MAX_VALUE ,l =0 ;
		long ans =0 ;

		long[] b ,g ;

		byte f =0 ;

		b =new long[n] ;	g =new long[m] ;

		for (i =0; i<n; i++) {
			b[i] =(long)fr.nextInt() ;

			j =Math.max(j , b[i]) ;//has to give atleast this much
		}

		for (i=0;i<m ;i++ ) {
			g[i] =(long)fr.nextInt() ;	l += g[i] ;

			k =Math.min(k , g[i]) ;//can only receive this much
		}
		if(j > k)
			op.println("-1") ;
		else {
			for (i =0;i<n;i++) {
				if((b[i] == j)&&(f==0)) {
					ans += l ;	f=1 ;
				}
				else {
					ans += (b[i]*m) ;
				}
			}
			op.println(ans);
		}

		op.flush();	op.close();
	}

	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

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

		String next() {
			while (st==null || (!st.hasMoreElements()))
			{
				try
				{
					st =new StringTokenizer(br.readLine());
				}
				catch(IOException e)
				{
					e.printStackTrace();
				}

			}
			return st.nextToken();
		}

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


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main
{
	public static void main(String[] args)
	{
		FastReader fr =new FastReader();

		PrintWriter op =new PrintWriter(System.out);

		int n =fr.nextInt() , m =fr.nextInt() ,i ;
		long j =Long.MIN_VALUE ,k =Long.MAX_VALUE ,l =0 ;
		long ans =0 ;

		long[] b ,g ;

		b =new long[n] ;	g =new long[m] ;

		for (i =0; i<n; i++) {
			b[i] =fr.nextInt() ;

			j =Math.max(j , b[i]) ;//has to give atleast this much
		}

		for (i=0;i<m ;i++ ) {
			g[i] =fr.nextInt() ;	l+=g[i] ;

			k =Math.min(k , g[i]) ;//can only receive this much
		}
		if(j > k)	op.println("-1") ;
		else {
			for (i =0;i<n;i++) {
				if(b[i] == j) {
					ans += l ;
				}
				else {
					ans += (b[i]*m) ;
				}
			}
			op.println(ans);
		}

		op.flush();	op.close();
	}

	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

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

		String next() {
			while (st==null || (!st.hasMoreElements()))
			{
				try
				{
					st =new StringTokenizer(br.readLine());
				}
				catch(IOException e)
				{
					e.printStackTrace();
				}

			}
			return st.nextToken();
		}

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


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main
{
	public static void main(String[] args)
	{
		FastReader fr =new FastReader();

		PrintWriter op =new PrintWriter(System.out);

		int n =fr.nextInt() , m =fr.nextInt() ,i ,j_indx=-1;
		long j =Long.MIN_VALUE ,k =Long.MAX_VALUE ,l =0 ;
		long ans =0 ;

		long[] b ,g ;

		byte f =0 ,f1 =0 ;

		b =new long[n] ;	g =new long[m] ;

		for (i =0; i<n; i++) {
			b[i] =(long)fr.nextInt() ;

			if(j <= b[i]) {
				j =b[i] ;	j_indx=i ;
			}//j =Math.max(j , b[i]) ;//has to give atleast this much
		}

		long mx =-1,dff =Long.MAX_VALUE ;

		for(i =0;i<n;i++) {
			if(i==j_indx)
				continue ;

			if((j-b[i]) < dff) {
				mx =b[i] ;dff =(j-b[i]) ;
			}
		}

		for (i=0;i<m ;i++ ) {
			g[i] =(long)fr.nextInt() ;	l += g[i] ;

			k =Math.min(k , g[i]) ;//can only receive this much
		}

		l -= k;

		if(j > k)
			op.println("-1") ;
		else
		{
			for (i =0;i<n;i++)
			{
				if (j < k) {
					if((i == j_indx)&&(f==0)) {
						ans += (l+b[i]) ;	f=1 ;
					}
					else {
						if((b[i]==mx)&&(f1==0)) {
							ans+=(b[i]*(m-1)+k);	f1=1 ;
						}
						else
							ans += (b[i]*m) ;
					}
				}
				else {
					if((i == j_indx)&&(f==0)) {
						ans += (l+k);	f =1 ;
					}
					else {
						ans += (b[i]*m) ;
					}
				}
			}
			op.println(ans);
		}

		op.flush();	op.close();
	}

	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

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

		String next() {
			while (st==null || (!st.hasMoreElements()))
			{
				try
				{
					st =new StringTokenizer(br.readLine());
				}
				catch(IOException e)
				{
					e.printStackTrace();
				}

			}
			return st.nextToken();
		}

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


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

	public static long solve(Integer b[], Integer g[], int boy, int girl){

		Arrays.sort(b, Collections.reverseOrder());
		Arrays.sort(g, Collections.reverseOrder());

		if(g[girl-1]<b[0])
			return -1;

		int count[]=new int[boy];
		boolean flag[]=new boolean[boy];

		int j=0;
		long sweet=0;

		for(int i=0; i<girl; ){

			if(count[j]==girl-1){

				if(flag[j] || b[j]==g[i]){
					count[j]+=1;
					sweet+=g[i];
					i+=1;
				}

				j+=1;
			}
			else{
				count[j]+=1;
				sweet+=g[i];
				i+=1;
			}

		}

		for(int i=0; i<boy; i++)
			sweet+=(girl-count[i])*b[i];

		return sweet;
	}

	public static void main(String args[])throws IOException{

		Scanner in=new Scanner(System.in);

		int boy =in.nextInt(),
			girl=in.nextInt();

		Integer b[]=new Integer[boy];
		for(int i=0; i<boy; i++)
			b[i]=in.nextInt();

		Integer g[]=new Integer[girl];
		for(int i=0; i<girl; i++)
			g[i]=in.nextInt();

		System.out.println(solve(b, g, boy, girl));
	}
}


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

	public static long solve(Long b[], Long g[], int boy, int girl){

		Arrays.sort(b, Collections.reverseOrder());
		Arrays.sort(g, Collections.reverseOrder());

		if(g[girl-1]<b[0])
			return -1;

		Long count[]=new Long[boy];
		Arrays.fill(count, 0L);
		boolean flag[]=new boolean[boy];

		int j=0;
		long sweet=0;

		for(int i=0; i<girl; ){

			if(count[j]==girl-1){

				if(flag[j] || b[j]==g[i]){
					count[j]+=1;
					sweet+=g[i];
					i+=1;
				}

				j+=1;
			}
			else{
				count[j]+=1;
				sweet+=g[i];
				i+=1;
			}

		}

		for(int i=0; i<boy; i++)
			sweet+=(girl-count[i])*b[i];

		return sweet;
	}

	public static void main(String args[])throws IOException{

		Scanner in=new Scanner(System.in);

		int boy =in.nextInt(),
			girl=in.nextInt();

		Long b[]=new Long[boy];
		for(int i=0; i<boy; i++)
			b[i]=in.nextLong();

		Long g[]=new Long[girl];
		for(int i=0; i<girl; i++)
			g[i]=in.nextLong();

		System.out.println(solve(b, g, boy, girl));
	}
}


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

	public static long solve(Long b[], Long g[], int boy, int girl){

		Arrays.sort(b, Collections.reverseOrder());
		Arrays.sort(g, Collections.reverseOrder());

		if(g[girl-1]<b[0])
			return -1;

		Long count[]=new Long[boy];
		Arrays.fill(count, 0L);
		boolean flag[]=new boolean[boy];

		int j=0;
		long sweet=0;

		for(int i=0; i<girl; ){

			if(count[j]==girl-1){

				if(flag[j] || b[j]==g[i]){
					count[j]+=1;
					sweet+=g[i];
					i+=1;
				}

				j+=1;
			}
			else{
				count[j]+=1;
				sweet+=g[i];
				i+=1;
			}

		}

		for(int i=0; i<boy; i++)
			sweet+=((long)girl-count[i])*b[i];

		return sweet;
	}

	public static void main(String args[])throws IOException{

		Scanner in=new Scanner(System.in);

		int boy =in.nextInt(),
			girl=in.nextInt();

		long b[]=new long[boy];
		for(int i=0; i<boy; i++)
			b[i]=in.nextLong();

		long g[]=new long[girl];
		for(int i=0; i<girl; i++)
			g[i]=in.nextLong();

		long max1=0, max2=0;
		for(int i=0; i<boy; i++){
			if(b[i]>=max1){
				max2=max1;
				max1=b[i];
			}
			else if(b[i]>=max2)
				max2=b[i];
		}

		long min=Long.MAX_VALUE;
		for(int i=0; i<girl; i++)
			min=Math.min(min, g[i]);

		if(min<max1){
			System.out.println("-1");
			return;
		}

		long sum_boy=0;
		for(int i=0; i<boy; i++)
			sum_boy+=b[i];

		long sum_girl=0;
		for(int i=0; i<girl; i++)
			sum_girl+=g[i];

		if(min==max1)
			System.out.println(sum_boy*girl + sum_girl - max1*girl);
		else
			System.out.println(sum_boy*girl + sum_girl - max1*(girl-1) - max2);
	}
}


import java.util.Scanner;

public class Codeforces {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        int m = input.nextInt();
        int sumg = 0;
        int sumb = 0;
        int mini = 1000000000;
        int maxi = 0;
        int maxi2 = 0;
        for (int i=0; i<n; i++){
            int b = input.nextInt();
            sumb += b;
            if (b > maxi2 && b < maxi){
                maxi2 = b;
            } else if (b == maxi){
                maxi2 = b;
            } else if (b > maxi){
                maxi2 = maxi;
                maxi = b;
            }
        }
        for (int i=0; i<m; i++){
            int g = input.nextInt();
            if (g < mini) mini = g;
            sumg += g;
        }
        if (mini < maxi) System.out.println("-1"); else
            if (mini == maxi) System.out.println(sumb*m+sumg-maxi*m); else
                if (mini > maxi) System.out.println(sumb*m+sumg-maxi*(m-1)-maxi2);
    }

}


import java.util.Scanner;

public class Codeforces {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        int m = input.nextInt();
        long sumg = 0;
        long sumb = 0;
        int mini = 1000000000;
        int maxi = 0;
        int maxi2 = 0;
        for (int i=0; i<n; i++){
            int b = input.nextInt();
            sumb += b;
            if (b > maxi2 && b < maxi){
                maxi2 = b;
            } else if (b == maxi){
                maxi2 = b;
            } else if (b > maxi){
                maxi2 = maxi;
                maxi = b;
            }
        }
        for (int i=0; i<m; i++){
            int g = input.nextInt();
            if (g < mini) mini = g;
            sumg += g;
        }
        if (mini < maxi) System.out.println("-1"); else
            if (mini == maxi) System.out.println((long) sumb*m+sumg-maxi*m); else
                if (mini > maxi) System.out.println((long) sumb*m+sumg-maxi*(m-1)-maxi2);
    }

}


import java.util.Scanner;

public class Codeforces {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        int m = input.nextInt();
        int sumg = 0;
        int sumb = 0;
        int mini = 1000000000;
        int maxi = 0;
        int maxi2 = 0;
        for (int i=0; i<n; i++){
            int b = input.nextInt();
            sumb += b;
            if (b > maxi2 && b < maxi){
                maxi2 = b;
            } else if (b == maxi){
                maxi2 = b;
            } else if (b > maxi){
                maxi2 = maxi;
                maxi = b;
            }
        }
        for (int i=0; i<m; i++){
            int g = input.nextInt();
            if (g < mini) mini = g;
            sumg += g;
        }
        if (mini < maxi) System.out.println("-1"); else
            if (mini == maxi) System.out.println(sumb*m+sumg-maxi*m); else
                if (mini > maxi) System.out.println(sumb*m+sumg-maxi*(m-1)-maxi2);
    }
}


import java.util.Scanner;

public class Codeforces {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        int m = input.nextInt();
        int[] nm = new int[n], mm = new int[m];
        int maxi = 0;
        int maxi2 =0;
        int mini = 1000000000;
        int place = 0;
        int place2;
        int sumg = 0;
        int sumb = 0;
        for (int i=0; i<n; i++){
            int l = input.nextInt();
            if (l <= maxi && l > maxi2){
                place2 = i;
                maxi2 = l;
            }
            if (l > maxi){
                place2 = place;
                maxi2 = maxi;
                place = i;
                maxi = l;
            }

            nm[i] = l;
            sumb += l;
        }
        for (int i=0; i<m; i++){
            int l = input.nextInt();
            mini = Math.min(mini, l);
            mm[i] = l;
            sumg += l;
        }
        if (maxi>mini) System.out.println("-1"); else {
            if (mini == maxi) System.out.println((sumb-1)*m + sumg); else {
                System.out.println(sumg + m*sumb - (m-1)*maxi - maxi2);
            }
        }
    }
}


import java.util.Scanner;

public class Codeforces {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        int m = input.nextInt();
        int sumg = 0;
        int sumb = 0;
        int mini = 1000000000;
        int maxi = 0;
        int maxi2 = 0;
        for (int i=0; i<n; i++){
            int b = input.nextInt();
            sumb += b;
            if (b > maxi2 && b < maxi){
                maxi2 = b;
            } else if (b == maxi){
                maxi2 = b;
            } else if (b > maxi){
                maxi2 = maxi;
                maxi = b;
            }
        }
        for (int i=0; i<m; i++){
            int g = input.nextInt();
            if (g < mini) mini = g;
            sumg += g;
        }
        if (mini < maxi) System.out.println("-1"); else
            if (mini == maxi) System.out.println((long) sumb*m+sumg-maxi*m); else
                if (mini > maxi) System.out.println((long) sumb*m+sumg-maxi*(m-1)-maxi2);
    }

}


import java.util.Scanner;

public class Codeforces {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        int m = input.nextInt();
        long sumg = 0;
        long sumb = 0;
        int mini = 1000000000;
        int maxi = 0;
        int maxi2 = 0;
        for (int i=0; i<n; i++){
            int b = input.nextInt();
            sumb += b;
            if (b > maxi2 && b < maxi){
                maxi2 = b;
            } else if (b == maxi){
                maxi2 = b;
            } else if (b > maxi){
                maxi2 = maxi;
                maxi = b;
            }
        }
        for (int i=0; i<m; i++){
            int g = input.nextInt();
            if (g < mini) mini = g;
            sumg += g;
        }
        if (mini < maxi) System.out.println("-1"); else
            if (mini == maxi) System.out.println(sumb*m+sumg-maxi*m); else
                if (mini > maxi) System.out.println(sumb*m+sumg-maxi*(m-1)-maxi2);
    }

}


import java.util.Scanner;

public class Codeforces {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        long n = input.nextInt();
        long m = input.nextInt();
        long sumg = 0;
        long sumb = 0;
        long mini = 1000000000;
        long maxi = 0;
        long maxi2 = 0;
        for (int i=0; i<n; i++){
            long b = input.nextInt();
            sumb += b;
            if (b > maxi2 && b < maxi){
                maxi2 = b;
            } else if (b == maxi){
                maxi2 = b;
            } else if (b > maxi){
                maxi2 = maxi;
                maxi = b;
            }
        }
        for (int i=0; i<m; i++){
            long g = input.nextInt();
            if (g < mini) mini = g;
            sumg += g;
        }
        if (mini < maxi) System.out.println("-1"); else
            if (mini == maxi) System.out.println(sumb*m+sumg-maxi*m); else
                if (mini > maxi) System.out.println(sumb*m+sumg-maxi*(m-1)-maxi2);
    }

}