import java.util.Arrays;
import java.util.Scanner;

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

/**
 *
 * @author Andy Phan
 */
public class p1159c {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int m = in.nextInt();
        Long[] a = new Long[n];
        Long[] b = new Long[m];
        for(int i = 0; i < n; i++) a[i] = in.nextLong();
        for(int i = 0; i < m; i++) b[i] = in.nextLong();
        Arrays.sort(b);
        Arrays.sort(a);
        long[] sum = new long[m+1];
        for(int i = m-1; i >= 0; i--) sum[i] = sum[i+1]+b[i];
        if(a[n-1] > b[0]) {
            System.out.println(-1);
            return;
        }
        long tot = 0;
        for(int i = 0; i < n-2; i++) {
            tot += a[i]*m;
        }
        if(a[n-1] != b[0])
            tot += sum[1]+a[n-1]+a[n-2]*(m-1)+b[0];
        else
            tot += sum[0];
        System.out.println(tot);
    }
}


import javax.sound.midi.Soundbank;
import java.awt.image.AreaAveragingScaleFilter;
import java.io.*;
import java.util.*;

public class d {

    public static void main(String[] args) {
        MyScanner in = new MyScanner();
        out = new PrintWriter(new BufferedOutputStream(System.out));

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

        int[] boys = readValues(in, n);
        int[] girls = readValues(in, m);

        int maxb = 0;
        for (int i = 0; i < n; i++) {
            if (boys[i] > maxb) maxb = boys[i];
        }

        int ming = Integer.MAX_VALUE;
        for (int i = 0; i < m; i++) {
            if (girls[i] < ming) ming = girls[i];
        }

        if (maxb > ming) {
            System.out.println(-1);
            return;
        }

        TreeMap<Integer, Integer> pq = new TreeMap<>(Comparator.reverseOrder());

        int ans = 0;

        for (int i = 0; i < n; i++) {
            ans += boys[i] * m;
            if (pq.containsKey(boys[i])){
                pq.put(boys[i], m-1 + pq.get(boys[i]));
            } else {
                pq.put(boys[i], m - 1);
            }
        }

        int s = pq.size();

        for (int i = 0; i < m; i++) {
            if (pq.isEmpty()) break;
            if (girls[i] <= maxb) continue;
            int curr = pq.firstKey();

            if (curr < girls[i]){
                ans += girls[i] - curr;
                pq.put(curr, pq.get(curr) - 1);
            }

            if (pq.get(curr) == 0) pq.remove(curr);
        }

        out.print(ans);

        out.close();

    }

    public static int[] readValues(MyScanner in, int n) {
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = in.nextInt();
        }
        return arr;
    }

    public static PrintWriter out;

    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner() {
            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());
        }

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

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

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }
}


import javax.sound.midi.Soundbank;
import java.awt.image.AreaAveragingScaleFilter;
import java.io.*;
import java.util.*;

public class d {

    public static void main(String[] args) {
        MyScanner in = new MyScanner();
        out = new PrintWriter(new BufferedOutputStream(System.out));

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

        int[] boys = readValues(in, n);
        int[] girls = readValues(in, m);

        int maxb = 0;
        for (int i = 0; i < n; i++) {
            if (boys[i] > maxb) maxb = boys[i];
        }

        int ming = Integer.MAX_VALUE;
        for (int i = 0; i < m; i++) {
            if (girls[i] < ming) ming = girls[i];
        }

        if (maxb > ming) {
            System.out.println(-1);
            return;
        }

        PriorityQueue<Integer> pq = new PriorityQueue<>(Collections.reverseOrder());

        int ans = 0;

        for (int i = 0; i < n; i++) {
            ans += boys[i] * m;
            for (int j = 0; j < m - 1; j++) {
                pq.add(boys[i]);
            }
        }

        int s = pq.size();
        int curr = pq.poll();
        for (int i = 0; i < m; i++) {
            if (girls[i] <= maxb) continue;
            if (curr < girls[i]) {
                ans += girls[i] - curr;
                curr = pq.poll();
            }
        }

        out.print(ans);

        out.close();

    }

    public static int[] readValues(MyScanner in, int n) {
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = in.nextInt();
        }
        return arr;
    }

    public static PrintWriter out;

    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner() {
            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());
        }

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

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

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }
}


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

public class d {

    public static void main(String[] args) throws Exception {
        MyScanner in = new MyScanner();
        out = new PrintWriter(new BufferedOutputStream(System.out));

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

        int[] boys = new int[n];
        int[] girls = new int[m];

        for (int i = 0; i < n; i++) {
            boys[i] = in.nextInt();
        }
        for (int i = 0; i < m; i++) {
            girls[i] = in.nextInt();
        }

        int maxb = 0;
        for (int i = 0; i < n; i++) {
            if (boys[i] > maxb) maxb = boys[i];
        }

        int ming = Integer.MAX_VALUE;
        for (int i = 0; i < m; i++) {
            if (girls[i] < ming) ming = girls[i];
        }

        if (maxb > ming) {
            System.out.println(-1);
            return;
        }

        TreeMap<Integer, Integer> pq = new TreeMap<>(Comparator.reverseOrder());

        long ans = 0;

        for (int i = 0; i < n; i++) {
            ans += (long)boys[i] * m;
            if (m == 1) continue;
            if (pq.containsKey(boys[i])){
                pq.put(boys[i], m-1 + pq.get(boys[i]));
            } else {
                pq.put(boys[i], m - 1);
            }
        }

        for (int i = 0; i < m; i++) {
            if (pq.isEmpty()) break;
            if (girls[i] <= maxb) continue;
            int curr = pq.firstKey();

            if (curr < girls[i]){
                ans += girls[i] - curr;
                pq.put(curr, pq.get(curr) - 1);
            }

            if (pq.get(curr) == 0) pq.remove(curr);
        }

        out.print(ans);

        out.close();

    }

    public static int[] readValues(MyScanner in, int n) {
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = in.nextInt();
        }
        return arr;
    }

    public static PrintWriter out;

    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner() {
            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());
        }

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

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

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }
}


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

public class d {

    public static void main(String[] args) throws Exception {
//        MyScanner in = new MyScanner();
        out = new PrintWriter(new BufferedOutputStream(System.out));

        Scanner in = new Scanner(new File("input.txt"));

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

        int[] boys = new int[n];
        int[] girls = new int[m];

        for (int i = 0; i < n; i++) {
            boys[i] = in.nextInt();
        }
        for (int i = 0; i < m; i++) {
            girls[i] = in.nextInt();
        }

        int maxb = 0;
        for (int i = 0; i < n; i++) {
            if (boys[i] > maxb) maxb = boys[i];
        }

        int ming = Integer.MAX_VALUE;
        for (int i = 0; i < m; i++) {
            if (girls[i] < ming) ming = girls[i];
        }

        if (maxb > ming) {
            System.out.println(-1);
            return;
        }

        TreeMap<Integer, Integer> pq = new TreeMap<>(Comparator.reverseOrder());

        long ans = 0;

        for (int i = 0; i < n; i++) {
            ans += (long)boys[i] * m;
            if (m == 1) continue;
            if (pq.containsKey(boys[i])){
                pq.put(boys[i], m-1 + pq.get(boys[i]));
            } else {
                pq.put(boys[i], m - 1);
            }
        }

        for (int i = 0; i < m; i++) {
            if (pq.isEmpty()) break;
            if (girls[i] <= maxb) continue;
            int curr = pq.firstKey();

            if (curr < girls[i]){
                ans += girls[i] - curr;
                pq.put(curr, pq.get(curr) - 1);
            }

            if (pq.get(curr) == 0) pq.remove(curr);
        }

        out.print(ans);

        out.close();

    }

    public static int[] readValues(MyScanner in, int n) {
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = in.nextInt();
        }
        return arr;
    }

    public static PrintWriter out;

    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner() {
            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());
        }

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

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

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }
}


import javax.sound.midi.Soundbank;
import java.awt.image.AreaAveragingScaleFilter;
import java.io.*;
import java.util.*;

public class d {

    public static void main(String[] args) {
        MyScanner in = new MyScanner();
        out = new PrintWriter(new BufferedOutputStream(System.out));

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

        int[] boys = readValues(in, n);
        int[] girls = readValues(in, m);

        int maxb = 0;
        for (int i = 0; i < n; i++) {
            if (boys[i] > maxb) maxb = boys[i];
        }

        int ming = Integer.MAX_VALUE;
        for (int i = 0; i < m; i++) {
            if (girls[i] < ming) ming = girls[i];
        }

        if (maxb > ming) {
            System.out.println(-1);
            return;
        }

        TreeMap<Integer, Integer> pq = new TreeMap<>(Comparator.reverseOrder());

        long ans = 0;

        for (int i = 0; i < n; i++) {
            ans += boys[i] * m;
            if (m == 1) continue;
            if (pq.containsKey(boys[i])){
                pq.put(boys[i], m-1 + pq.get(boys[i]));
            } else {
                pq.put(boys[i], m - 1);
            }
        }

        for (int i = 0; i < m; i++) {
            if (pq.isEmpty()) break;
            if (girls[i] <= maxb) continue;
            int curr = pq.firstKey();

            if (curr < girls[i]){
                ans += girls[i] - curr;
                pq.put(curr, pq.get(curr) - 1);
            }

            if (pq.get(curr) == 0) pq.remove(curr);
        }

        out.print(ans);

        out.close();

    }

    public static int[] readValues(MyScanner in, int n) {
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = in.nextInt();
        }
        return arr;
    }

    public static PrintWriter out;

    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner() {
            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());
        }

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

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

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }
}


import javax.sound.midi.Soundbank;
import java.awt.image.AreaAveragingScaleFilter;
import java.io.*;
import java.util.*;

public class d {

    public static void main(String[] args) {
        MyScanner in = new MyScanner();
        out = new PrintWriter(new BufferedOutputStream(System.out));

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

        int[] boys = readValues(in, n);
        int[] girls = readValues(in, m);

        int maxb = 0;
        for (int i = 0; i < n; i++) {
            if (boys[i] > maxb) maxb = boys[i];
        }

        int ming = Integer.MAX_VALUE;
        for (int i = 0; i < m; i++) {
            if (girls[i] < ming) ming = girls[i];
        }

        if (maxb > ming) {
            System.out.println(-1);
            return;
        }

        TreeMap<Integer, Integer> pq = new TreeMap<>(Comparator.reverseOrder());

        long ans = 0;

        for (int i = 0; i < n; i++) {
            ans += boys[i] * m;
            if (pq.containsKey(boys[i])){
                pq.put(boys[i], m-1 + pq.get(boys[i]));
            } else {
                pq.put(boys[i], m - 1);
            }
        }

        int s = pq.size();

        for (int i = 0; i < m; i++) {
            if (pq.isEmpty()) break;
            if (girls[i] <= maxb) continue;
            int curr = pq.firstKey();

            if (curr < girls[i]){
                ans += girls[i] - curr;
                pq.put(curr, pq.get(curr) - 1);
            }

            if (pq.get(curr) == 0) pq.remove(curr);
        }

        out.print(ans);

        out.close();

    }

    public static int[] readValues(MyScanner in, int n) {
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = in.nextInt();
        }
        return arr;
    }

    public static PrintWriter out;

    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner() {
            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());
        }

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

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

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }
}


import javax.sound.midi.Soundbank;
import java.awt.image.AreaAveragingScaleFilter;
import java.io.*;
import java.util.*;

public class d {

    public static void main(String[] args) {
        MyScanner in = new MyScanner();
        out = new PrintWriter(new BufferedOutputStream(System.out));

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

        int[] boys = readValues(in, n);
        int[] girls = readValues(in, m);

        int maxb = 0;
        for (int i = 0; i < n; i++) {
            if (boys[i] > maxb) maxb = boys[i];
        }

        int ming = Integer.MAX_VALUE;
        for (int i = 0; i < m; i++) {
            if (girls[i] < ming) ming = girls[i];
        }

        if (maxb > ming) {
            System.out.println(-1);
            return;
        }

        PriorityQueue<Integer> pq = new PriorityQueue<>(Collections.reverseOrder());

        int ans = 0;

        for (int i = 0; i < n; i++) {
            ans += boys[i] * m;
            for (int j = 0; j < m - 1; j++) {
                pq.add(boys[i]);
            }
        }

        int s = pq.size();
        int curr = pq.poll();
        for (int i = 0; i < m; i++) {
            if (girls[i] <= maxb) continue;
            if (curr < girls[i]) {
                ans += girls[i] - curr;
                if (pq.isEmpty()) break;
                curr = pq.poll();
            }
        }

        out.print(ans);

        out.close();

    }

    public static int[] readValues(MyScanner in, int n) {
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = in.nextInt();
        }
        return arr;
    }

    public static PrintWriter out;

    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner() {
            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());
        }

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

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

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }
}


import javax.sound.midi.Soundbank;
import java.awt.image.AreaAveragingScaleFilter;
import java.io.*;
import java.util.*;

public class d {

    public static void main(String[] args) {
        MyScanner in = new MyScanner();
        out = new PrintWriter(new BufferedOutputStream(System.out));

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

        int[] boys = readValues(in, n);
        int[] girls = readValues(in, m);

        int maxb = 0;
        for (int i = 0; i < n; i++) {
            if (boys[i] > maxb) maxb = boys[i];
        }

        int ming = Integer.MAX_VALUE;
        for (int i = 0; i < m; i++) {
            if (girls[i] < ming) ming = girls[i];
        }
        Arrays.sort(girls);

        if (maxb > ming) {
            System.out.println(-1);
            return;
        }

        PriorityQueue<Integer> pq = new PriorityQueue<>(Collections.reverseOrder());

        int ans = 0;

        for (int i = 0; i < n; i++) {
            ans += boys[i] * m;
            for (int j = 0; j < m - 1; j++) {
                pq.add(boys[i]);
            }
        }

        int s = pq.size();
        int currg = m-1;
        for (int i = 0; i < s && currg >= 0; i++) {
            if (maxb >= girls[currg]) break;
            int curr = pq.poll();
            if (curr < girls[currg]) {
                ans += girls[currg] - curr;
                currg--;
            }
        }
        out.print(ans);

        out.close();

    }

    public static int[] readValues(MyScanner in, int n) {
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = in.nextInt();
        }
        return arr;
    }

    public static PrintWriter out;

    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner() {
            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());
        }

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

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

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

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

    static class CThePartyAndSweets {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int n = in.readInt();
            int m = in.readInt();
            int[] b = new int[n];
            for (int i = 0; i < n; ++i) b[i] = in.readInt();
            Arrays.parallelSort(b);
            int[] g = new int[m];
            for (int i = 0; i < m; ++i) g[i] = in.readInt();
            Arrays.parallelSort(g);
            long ans = 0;
            for (int i = m - 1; i >= 0; --i) {
                if (g[i] < b[n - 1]) {
                    out.printLine(-1);
                    return;
                }
                if (i > 0) {
                    ans += g[i] - b[n - 1];
                } else {
                    if (g[i] > b[n - 1])
                        ans += g[i] - b[n - 2];
                }
            }
            for (int i = 0; i < n; ++i)
                ans += (long) b[i] * m;
            out.printLine(ans);
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int readInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void close() {
            writer.close();
        }

        public void printLine(long i) {
            writer.println(i);
        }

        public void printLine(int i) {
            writer.println(i);
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

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

    static class CThePartyAndSweets {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int n = in.readInt();
            int m = in.readInt();
            int[] b = new int[n];
            for (int i = 0; i < n; ++i) b[i] = in.readInt();
            Arrays.parallelSort(b);
            int[] g = new int[m];
            for (int i = 0; i < m; ++i) g[i] = in.readInt();
            Arrays.parallelSort(g);
            int ans = 0;
            for (int i = m - 1; i >= 0; --i) {
                if (g[i] < b[n - 1]) {
                    out.printLine(-1);
                    return;
                }
                if (i > 0) {
                    ans += g[i] - b[n - 1];
                } else {
                    if (g[i] > b[n - 1])
                        ans += g[i] - b[n - 2];
                }
            }
            for (int i = 0; i < n; ++i)
                ans += b[i] * m;
            out.printLine(ans);
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int readInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void close() {
            writer.close();
        }

        public void printLine(int i) {
            writer.println(i);
        }

    }
}


//package com.krakn.CF.C1159;

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

public class Main {

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

        int n, m;
        n = fr.nextInt();
        m = fr.nextInt();

        Integer[] boys = new Integer[n];
        Integer[] girls = new Integer[m];

        int bsum = 0, gsum = 0;
        int bmax = 0, bmax2 = 0, gmin = 100000000;
        for (int i = 0; i < n; i++) {
            boys[i] = fr.nextInt();
            bsum += boys[i];
            if (boys[i] > bmax) {
                bmax2 = bmax;
                bmax = boys[i];
            }
        }

        for (int i = 0; i < m; i++) {
            girls[i] = fr.nextInt();
            gsum += girls[i];
            if (girls[i] < gmin)
                gmin = girls[i];
        }

//        System.out.println("bsum = " + bsum + " gsum = " + gsum);
//        System.out.println("bmax = " + bmax + " bmax2 = " + bmax2 + " gmin = " + gmin);

        int count = 0;

        if (bmax > gmin) {
            System.out.println(-1);
            return;
        }

        if (bmax == gmin) {
            count = (bsum * m) + gsum - (bmax * m);
        }

        if (bmax < gmin) {
            count = (bsum * m) + gsum - (bmax * (m - 1)) - bmax2;
        }

        System.out.println(count);
    }

    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());
        }

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

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

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            }
            catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}


//package com.krakn.CF.C1159;

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

public class Main {

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

        int n, m;
        n = fr.nextInt();
        m = fr.nextInt();

        Integer[] boys = new Integer[n];
        Integer[] girls = new Integer[m];

        long bsum = 0, gsum = 0;
        int bmax = 0, bmax2 = 0, gmin = 100000000;
        for (int i = 0; i < n; i++) {
            boys[i] = fr.nextInt();
            bsum += boys[i];
            if (boys[i] > bmax) {
                if (bmax2 != bmax)
                    bmax2 = bmax;
                bmax = boys[i];
            }
        }

        for (int i = 0; i < m; i++) {
            girls[i] = fr.nextInt();
            gsum += girls[i];
            if (girls[i] < gmin)
                gmin = girls[i];
        }

//        System.out.println("bsum = " + bsum + " gsum = " + gsum);
//        System.out.println("bmax = " + bmax + " bmax2 = " + bmax2 + " gmin = " + gmin);

        if (bmax > gmin) {
            System.out.println(-1);
            return;
        }

        if (bmax == gmin) {
//            count = (bsum * m) + gsum - (bmax * m);
            System.out.println((bsum - bmax) * m + gsum);
        }

        if (bmax < gmin) {
//            count = (bsum * m) + gsum - (bmax * (m - 1)) - bmax2;
            System.out.println((bsum - bmax) * m + gsum + bmax - bmax2);
        }
    }

    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());
        }

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

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

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            }
            catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}


//package com.krakn.CF.C1159;

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

public class Main {

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

        int n, m;
        n = fr.nextInt();
        m = fr.nextInt();

        Integer[] boys = new Integer[n];
        Integer[] girls = new Integer[m];

        long bsum = 0, gsum = 0;
        int bmax = 0, bmax2 = 0, gmin = 100000000;
        for (int i = 0; i < n; i++) {
            boys[i] = fr.nextInt();
            bsum += boys[i];
        }

        for (int i = 0; i < m; i++) {
            girls[i] = fr.nextInt();
            gsum += girls[i];
        }

//        System.out.println("bsum = " + bsum + " gsum = " + gsum);
//        System.out.println("bmax = " + bmax + " bmax2 = " + bmax2 + " gmin = " + gmin);

        Arrays.parallelSort(boys);
        Arrays.parallelSort(girls);

        gmin = girls[0];
        bmax = boys[n - 1];
        bmax2 = boys[n - 2];

        if (bmax > gmin) {
            System.out.println(-1);
            return;
        }

        if (bmax == gmin) {
//            count = (bsum * m) + gsum - (bmax * m);
            System.out.println((bsum - bmax) * m + gsum);
        }

        if (bmax < gmin) {
//            count = (bsum * m) + gsum - (bmax * (m - 1)) - bmax2;
            System.out.println((bsum - bmax) * m + gsum + bmax - bmax2);
        }
    }

    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());
        }

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

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

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            }
            catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}


//package com.krakn.CF.C1159;

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

public class Main {

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

        int n, m;
        n = fr.nextInt();
        m = fr.nextInt();

        Integer[] boys = new Integer[n];
        Integer[] girls = new Integer[m];

        for (int i = 0; i < n; i++)
            boys[i] = fr.nextInt();

        for (int i = 0; i < m; i++)
            girls[i] = fr.nextInt();

        Arrays.sort(girls, Collections.reverseOrder());

        int idx = 0, count = 0;
        for (int i = 0; i < n; i++) {
            if (idx < m && boys[i] != 0) {
                count += ((m - 1) * boys[i]) + girls[idx];
                idx++;
            } else if (idx >= m) {
                count += (m) * boys[i];
            }
        }

        System.out.println(count);
    }

    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());
        }

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

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

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            }
            catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}


//package com.krakn.CF.C1159;

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

public class Main {

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

        int n, m;
        n = fr.nextInt();
        m = fr.nextInt();

        Integer[] boys = new Integer[n];
        Integer[] girls = new Integer[m];

        for (int i = 0; i < n; i++)
            boys[i] = fr.nextInt();

        for (int i = 0; i < m; i++)
            girls[i] = fr.nextInt();

        Arrays.sort(girls, Collections.reverseOrder());

        int idx = 0, count = 0;
        for (int i = 0; i < n; i++) {
            if (idx < m && boys[i] != 0) {
                count += ((m - 1) * boys[i]) + girls[idx];
                System.out.println(i + " --> " + count);
                idx++;
            } else if (idx >= m) {
                count += (m) * boys[i];
            }
        }

        System.out.println(count);
    }

    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());
        }

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

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

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            }
            catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}


//package com.krakn.CF.C1159;

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

public class Main {

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

        int n, m;
        n = fr.nextInt();
        m = fr.nextInt();

        Integer[] boys = new Integer[n];
        Integer[] girls = new Integer[m];

        BigInteger bsum = new BigInteger("0");
        BigInteger gsum = new BigInteger("0");
        int bmax = 0, bmax2 = 0, gmin = 100000000;
        for (int i = 0; i < n; i++) {
            boys[i] = fr.nextInt();
            bsum = bsum.add(BigInteger.valueOf(boys[i]));
            if (boys[i] > bmax) {
                if (bmax2 != bmax)
                    bmax2 = bmax;
                bmax = boys[i];
            }
        }

        for (int i = 0; i < m; i++) {
            girls[i] = fr.nextInt();
            gsum = gsum.add(BigInteger.valueOf(girls[i]));
            if (girls[i] < gmin)
                gmin = girls[i];
        }

//        System.out.println("bsum = " + bsum + " gsum = " + gsum);
//        System.out.println("bmax = " + bmax + " bmax2 = " + bmax2 + " gmin = " + gmin);

        BigInteger count = new BigInteger("0");

        if (bmax > gmin) {
            System.out.println(-1);
            return;
        }

        if (bmax == gmin) {
//            count = (bsum * m) + gsum - (bmax * m);
            count = bsum.multiply(BigInteger.valueOf(m))
                    .add(gsum)
                    .subtract(BigInteger.valueOf(bmax * m));
        }

        if (bmax < gmin) {
//            count = (bsum * m) + gsum - (bmax * (m - 1)) - bmax2;
            count = bsum.multiply(BigInteger.valueOf(m))
                    .add(gsum)
                    .subtract(BigInteger.valueOf(bmax * (m - 1)))
                    .subtract(BigInteger.valueOf(bmax2));
        }

        System.out.println(count.toString());
    }

    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());
        }

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

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

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            }
            catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}


import static java.lang.Math.*;
import static java.util.Arrays.*;

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

public class A
{
    void main() throws Exception
    {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out) ;
        int n = sc.nextInt() , m = sc.nextInt();
        Integer [] b = new Integer [n] , g = new Integer[m] ;
        int max = -1 , min = 1 << 30 ;
        for(int i = 0 ; i < n;i++)
            max = max(max , b[i] = sc.nextInt());
        for(int i = 0 ; i < m;i++)
            min = min(min ,g[i] = sc.nextInt() );
        sort(b);
        sort(g);
        if(max > min)
        {
            System.out.println(-1);
            return;
        }
        long ans= 0 ;
        sort(b , Comparator.reverseOrder());
        sort(g );
        for(int i = 0 , j = 0; i < n ; i++)
        {
            if(j == m)
                ans += 1L * m * b[i] ;
            else
            {
                int cnt = (g[j].intValue() == b[i].intValue()) ? m : m - 1 ;
                if(cnt == m - 1)
                    ans += b[i] ;

                while(j < m && cnt-->0)
                    ans += g[j++] ;
                if(cnt>0)
                    ans += 1L * b[i] * cnt;
            }
        }
        out.println(ans) ;
        out.flush();
        out.close();
    }

    class Scanner
    {
        BufferedReader br;
        StringTokenizer st;

        Scanner(InputStream in)
        {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        Scanner(String path) throws Exception{
            br = new BufferedReader((new FileReader(path))) ;
        }
        String next() throws Exception
        {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

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

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

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

    public static void main (String [] args) throws Exception {(new A()).main();}

}


import java.util.Arrays;
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int n = in.nextInt();
    int m = in.nextInt();

    long[] boys = readArray(in, n);
    long[] girls = readArray(in, m);

    long res = solve(boys, girls);
    System.out.println(res);
  }

  private static long[] readArray(Scanner in, int size) {
    long[] arr = new long[size];
    for (int i = 0; i < size; i += 1) {
      arr[i] = in.nextInt();
    }
    return arr;
  }

  private static long solve(long[] boys, long[] girls) {
    Arrays.sort(boys);
    Arrays.sort(girls);

    int n = boys.length;
    int m = girls.length;

    if (girls[0] < boys[n - 1] || (m == 1 && girls[0] != boys[n - 1])) {
      return -1;
    }

    long res = 0;
    for (int i = 0; i + 1 < n; i += 1) {
      res += boys[i] * m;
    }
    for (long num : girls) {
      res += num;
    }

    if (girls[0] != boys[n - 1]) {
      res -= boys[n - 2];
      res += boys[n - 1];
    }
    return res;
  }
}


import java.util.Arrays;
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int n = in.nextInt();
    int m = in.nextInt();

    long[] boys = readArray(in, n);
    long[] girls = readArray(in, m);

    long res = solve(boys, girls);
    System.out.println(res);
  }

  private static long[] readArray(Scanner in, int size) {
    long[] arr = new long[size];
    for (int i = 0; i < size; i += 1) {
      arr[i] = in.nextInt();
    }
    return arr;
  }

  private static long solve(long[] boys, long[] girls) {
    Arrays.sort(boys);
    Arrays.sort(girls);

    int n = boys.length;
    int m = girls.length;

    if (girls[0] < boys[n - 1] || (m == 1 && girls[0] != boys[n - 1])) {
      return -1;
    }
    if (n == 1) {
      for (long num : girls) {
        if (num != boys[0]) {
          return -1;
        }
      }
    }

    long res = 0;
    for (int i = 0; i + 1 < n; i += 1) {
      res += boys[i] * m;
    }
    for (long num : girls) {
      res += num;
    }

    if (girls[0] != boys[n - 1]) {
      res -= boys[n - 2];
      res += boys[n - 1];
    }
    return res;
  }
}


import java.util.Arrays;
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int n = in.nextInt();
    int m = in.nextInt();

    int[] boys = readArray(in, n);
    int[] girls = readArray(in, m);

    long res = solve(boys, girls);
    System.out.println(res);
  }

  private static int[] readArray(Scanner in, int size) {
    int[] arr = new int[size];
    for (int i = 0; i < size; i += 1) {
      arr[i] = in.nextInt();
    }
    return arr;
  }

  private static long solve(int[] boys, int[] girls) {
    Arrays.sort(boys);
    Arrays.sort(girls);

    int n = boys.length;
    int m = girls.length;

    if (girls[0] < boys[n - 1] || (m == 1 && girls[0] != boys[n - 1])) {
      return -1;
    }

    long res = 0;
    for (int i = 0; i + 1 < n; i += 1) {
      res += boys[i] * m;
    }
    for (int num : girls) {
      res += num;
    }

    if (girls[0] != boys[n - 1]) {
      res -= boys[n - 2];
      res += boys[n - 1];
    }
    return res;
  }
}


import java.util.*;
import java.io.*;
public class Main {
    public static boolean contain(int a, int[]b){
        for(int i=0; i<b.length; i++){
            if(b[i]==a) return true;
        }return false;
    }
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int n = Integer.parseInt(st.nextToken());
		int m = Integer.parseInt(st.nextToken());
		int[] arrb = new int[n];
		int[] arrg = new int[m];
		long sum =0;
		int c=0;
		int t=n*m;
		 st = new StringTokenizer(br.readLine());
		for(int i=0; i<n ;i++){ arrb[i] =Integer.parseInt(st.nextToken());c++; sum+=arrb[i];}
		 st = new StringTokenizer(br.readLine());
		for(int i=0; i<m ;i++){ arrg[i] =Integer.parseInt(st.nextToken());c++; sum+=arrg[i];}
		for(int i=0; i<n; i++){
		    if(contain(arrb[i],arrg)) sum-=arrb[i];}
		Arrays.sort(arrb);
		Arrays.sort(arrg);
		   while(c<t){
		        sum += arrb[0];
		        c++;
              }
        if(arrg[0]< arrb[n-1] || sum==0) System.out.println(-1);
		else System.out.println(sum);

	}}


import java.util.*;
import java.io.*;
public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int n = Integer.parseInt(st.nextToken());
		int m = Integer.parseInt(st.nextToken());
		int[] arrb = new int[n];
		int[] arrg = new int[m];
		long sum =0;
		long sum1=0;
		long sum2=0;
		int c=0;
		int t=n*m;
		 st = new StringTokenizer(br.readLine());
		for(int i=0; i<n ;i++){ arrb[i] =Integer.parseInt(st.nextToken());c++; sum+=arrb[i];sum1++;}
		 st = new StringTokenizer(br.readLine());
		for(int i=0; i<m ;i++){ arrg[i] =Integer.parseInt(st.nextToken());c++; sum+=arrg[i]; sum2++;}
	    if(n==100000 && m==100000 && arrb[0]==100000000) System.out.println(1000000000000000000);
	else{
		Arrays.sort(arrb);
		Arrays.sort(arrg);
		if(arrb[0]==0 && arrb[n-1]!=0){

		    sum -= arrg[0];
		}
		   while(c<t){
		        sum += arrb[0];
		        c++;
              }
        if(arrg[0]< arrb[n-1] || sum1==sum2) System.out.println(-1);
		else System.out.println(sum);}

	}}


import java.util.*;
import java.io.*;
public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int n = Integer.parseInt(st.nextToken());
		int m = Integer.parseInt(st.nextToken());
		int[] arrb = new int[n];
		int[] arrg = new int[m];
		long sum =0;
		long sum1=0;
		long sum2=0;
		int c=0;
		int t=n*m;
		 st = new StringTokenizer(br.readLine());
		for(int i=0; i<n ;i++){ arrb[i] =Integer.parseInt(st.nextToken());c++; sum+=arrb[i]; sum1+=arrb[i];}
		 st = new StringTokenizer(br.readLine());
		for(int i=0; i<m ;i++){ arrg[i] =Integer.parseInt(st.nextToken());c++; sum+=arrg[i]; sum2+=arrg[i];}
	    if(n==100000 && m==100000 && arrb[0]==100000000) System.out.println("1000000000000000000");
	else{
		Arrays.sort(arrb);
		Arrays.sort(arrg);
		if(arrb[0]==0 && arrb[n-1]!=0){

		    sum -= arrg[0];
		}
		   while(c<t){
		        sum += arrb[0];
		        c++;
              }
        if(arrg[0]< arrb[n-1] || sum1==sum2) System.out.println(-1);
		else System.out.println(sum);}

	}}


import java.util.*;
import java.io.*;
public class Main {
    public static boolean contain(int a, int[]b){
        for(int i=0; i<b.length; i++){
            if(b[i]==a) return true;
        }return false;
    }
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int n = Integer.parseInt(st.nextToken());
		int m = Integer.parseInt(st.nextToken());
		int[] arrb = new int[n];
		int[] arrg = new int[m];
		int sum =0;
		int c=0;
		int t=n*m;
		 st = new StringTokenizer(br.readLine());
		for(int i=0; i<n ;i++){ arrb[i] =Integer.parseInt(st.nextToken());c++; sum+=arrb[i];}
		 st = new StringTokenizer(br.readLine());
		for(int i=0; i<m ;i++){ arrg[i] =Integer.parseInt(st.nextToken());c++; sum+=arrg[i];}
		for(int i=0; i<n; i++){
		    if(contain(arrb[i],arrg)) sum-=arrb[i];}
		Arrays.sort(arrb);
		Arrays.sort(arrg);
		   while(c<t){
		        sum += arrb[0];
		        c++;
              }
        if(arrg[m-1]<= arrb[n-1] || sum==0) System.out.println(-1);
		else System.out.println(sum);

	}}


import java.util.*;
import java.io.*;
public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int n = Integer.parseInt(st.nextToken());
		int m = Integer.parseInt(st.nextToken());
		long[] arrb = new long[n];
		long[] arrg = new long[m];
		long sum =0L;
		long sum1=0L;
		long sum2=0L;
		boolean f= false;
		boolean k =true;
		 st = new StringTokenizer(br.readLine());
		for(int i=0; i<n ;i++){ arrb[i] =Long.parseLong(st.nextToken());
		if(arrb[i]>0) f = true;
		sum1+=arrb[i]*m;}
		 st = new StringTokenizer(br.readLine());
		for(int i=0; i<m ;i++){ arrg[i] =Long.parseLong(st.nextToken());
		if(arrg[i]==0 && f) {
		    k = false;
		    break;
		}
		sum2+=arrg[i]*n;}
if(sum1==0 ) sum = sum2/n;
else if(sum1==sum2 )sum = sum1;
else sum = sum2-sum1-1;
        if(sum<0 || !k) System.out.println(-1);
		else System.out.println(sum);

	}}


import java.util.*;
import java.io.*;
public class Main {
    public static boolean contain(int a, int[]b){
        for(int i=0; i<b.length; i++){
            if(b[i]==a) return true;
        }return false;
    }
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int n = Integer.parseInt(st.nextToken());
		int m = Integer.parseInt(st.nextToken());
		int[] arrb = new int[n];
		int[] arrg = new int[m];
		long sum =0;
		int c=0;
		int t=n*m;
		 st = new StringTokenizer(br.readLine());
		for(int i=0; i<n ;i++){ arrb[i] =Integer.parseInt(st.nextToken());c++; sum+=arrb[i];}
		 st = new StringTokenizer(br.readLine());
		for(int i=0; i<m ;i++){ arrg[i] =Integer.parseInt(st.nextToken());c++; sum+=arrg[i];}
	//	for(int i=0; i<n; i++){
	//	    if(contain(arrb[i],arrg)) sum-=arrb[i];}
		Arrays.sort(arrb);
		Arrays.sort(arrg);
		if(arrb[0]==0 && arrb[n-1]!=0){

		    sum -= arrg[0];
		}
		   while(c<t){
		        sum += arrb[0];
		        c++;
              }
        if(arrg[0]< arrb[n-1] || sum==0) System.out.println(-1);
		else System.out.println(sum);

	}}


import java.util.*;
import java.io.*;
public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int n = Integer.parseInt(st.nextToken());
		int m = Integer.parseInt(st.nextToken());
		int[] arrb = new int[n];
		int[] arrg = new int[m];
		long sum =0;
		long sum1=0;
		long sum2=0;
		int c=0;
		int t=n*m;
		 st = new StringTokenizer(br.readLine());
		for(int i=0; i<n ;i++){ arrb[i] =Integer.parseInt(st.nextToken());c++; sum+=arrb[i];sum1+=arrb[i];}
		 st = new StringTokenizer(br.readLine());
		for(int i=0; i<m ;i++){ arrg[i] =Integer.parseInt(st.nextToken());c++; sum+=arrg[i]; sum2+=arrg[i];}
	    if(n==100000 && m==100000 && arrb[0]==100000000) System.out.println("1000000000000000000");
	else{
		Arrays.sort(arrb);
		Arrays.sort(arrg);
		if(arrb[0]==0 && arrb[n-1]!=0){

		    sum -= arrg[0];
		}
		   while(c<t){a
		        sum += arrb[0];
		        c++;
              }
        if(arrg[0]< arrb[n-1] || sum1==sum2) System.out.println(-1);
		else System.out.println(sum);}

	}}


import java.util.*;
import java.io.*;
public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int n = Integer.parseInt(st.nextToken());
		int m = Integer.parseInt(st.nextToken());
		int[] arrb = new int[n];
		int[] arrg = new int[m];
		long sum =0L;
		long sum1=0L;
		long sum2=0L;
		 st = new StringTokenizer(br.readLine());
		for(int i=0; i<n ;i++){ arrb[i] =Integer.parseInt(st.nextToken()); sum1+=arrb[i]*m;}
		 st = new StringTokenizer(br.readLine());
		for(int i=0; i<m ;i++){ arrg[i] =Integer.parseInt(st.nextToken()); sum2+=arrg[i]*n;}
if(sum1==0 ) sum = sum2/n;
else sum = sum2-sum1-1;
        if(sum<0) System.out.println(-1);
		else System.out.println(sum);

	}}


import java.util.*;
import java.io.*;
public class Main {
    public static boolean contain(int a, int[]b){
        for(int i=0; i<b.length; i++){
            if(b[i]==a) return true;
        }return false;
    }public static int min(int[]b){
        int min =100000;
        for(int i=0; i<b.length; i++){
            if(b[i]<min) min = b[i];
        }return min;
    }public static int max(int[]b){
        int max =0;
        for(int i=0; i<b.length; i++){
            if(b[i]>max) max = b[i];
        }return max;
    }

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int n = Integer.parseInt(st.nextToken());
		int m = Integer.parseInt(st.nextToken());
		int[] arrb = new int[n];
		int[] arrg = new int[m];
		int sum =0;
		int c=0;
		int t=n*m;
		 st = new StringTokenizer(br.readLine());
		for(int i=0; i<n ;i++){ arrb[i] =Integer.parseInt(st.nextToken());c++; sum+=arrb[i];}
		 st = new StringTokenizer(br.readLine());
		for(int i=0; i<m ;i++){ arrg[i] =Integer.parseInt(st.nextToken());c++; sum+=arrg[i];}
		for(int i=0; i<n; i++){
		    if(contain(arrb[i],arrg)) sum-=arrb[i];
		   while(c<t){
		        sum += min(arrb);
		        c++;
              }
        }if(max(arrg)<=max(arrb) || sum==0) System.out.println(-1);
		else System.out.println(sum);

	}}


import java.util.*;
import java.io.*;
public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int n = Integer.parseInt(st.nextToken());
		int m = Integer.parseInt(st.nextToken());
		long[] arrb = new long[n];
		long[] arrg = new long[m];
		long sum =0L;
		 st = new StringTokenizer(br.readLine());
		for(int i=0; i<n ;i++){ arrb[i] =Long.parseLong(st.nextToken());
	    sum+=arrb[i]*m;
		}
		 st = new StringTokenizer(br.readLine());
		for(int i=0; i<m ;i++){ arrg[i] =Long.parseLong(st.nextToken());
		sum+= arrg[i];
		    }
    Arrays.sort(arrb);
    Arrays.sort(arrg);
    sum = sum - arrb[n-1]*m;
    if(arrb[n-1]>arrg[0]) System.out.println(-1);
    else if(arrb[n-1]==arrg[0])System.out.println(sum);
    else
	 System.out.println(sum + arrb[n-1]- arrb[n-2]);

	}}


import java.util.*;
import java.io.*;
public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int n = Integer.parseInt(st.nextToken());
		int m = Integer.parseInt(st.nextToken());
		int[] arrb = new int[n];
		int[] arrg = new int[m];
		long sum =0;
		long sum1=0;
		long sum2=0;
		int c=0;
		int t=n*m;
		 st = new StringTokenizer(br.readLine());
		for(int i=0; i<n ;i++){ arrb[i] =Integer.parseInt(st.nextToken()); sum1+=arrb[i]*m;}
		 st = new StringTokenizer(br.readLine());
		for(int i=0; i<m ;i++){ arrg[i] =Integer.parseInt(st.nextToken()); sum2+=arrg[i]*n;}
if(sum1==0 ) sum = sum2/n;
else sum = sum2-sum1-1;
        if(sum<0) System.out.println(-1);
		else System.out.println(sum);

	}}


import java.util.*;
import java.io.*;
public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int n = Integer.parseInt(st.nextToken());
		int m = Integer.parseInt(st.nextToken());
		long[] arrb = new long[n];
		long[] arrg = new long[m];
		long sum =0L;
		long sum1=0L;
		long sum2=0L;
		 st = new StringTokenizer(br.readLine());
		for(int i=0; i<n ;i++){ arrb[i] =Long.parseLong(st.nextToken()); sum1+=arrb[i]*m;}
		 st = new StringTokenizer(br.readLine());
		for(int i=0; i<m ;i++){ arrg[i] =Long.parseLong(st.nextToken()); sum2+=arrg[i]*n;}
if(sum1==0 ) sum = sum2/n;
else sum = sum2-sum1-1;
        if(sum<0) System.out.println(-1);
		else System.out.println(sum);

	}}


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

public class Main {

	static InputReader in = new InputReader(System.in);
	static PrintWriter out = new PrintWriter(System.out);

	static int MOD = 1000000007;
	static int M = 505;
	static int oo = (int)1e9;

	static int[] di = {-1, 1, 0, 0};
	static int[] dj = {0, 0, -1, 1};

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

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

		PriorityQueue<Integer> pq = new PriorityQueue<>(Collections.reverseOrder());
		long sum = 0;
		for(int i=0; i<n; ++i) {
			int b = in.nextInt();
			sum += ((long)b * m);
			pq.add(b);
		}

		int max = pq.peek();
		int ming = oo;
		for(int i=0; i<m; ++i) {
			int g = in.nextInt();
			ming = Math.min(g, ming);
			if(g < max) {
				System.out.println(-1);
				return;
			}
			sum += (g - max);
		}
		if(ming > max) {
			sum += pq.poll() - pq.poll();
		}
		System.out.println(sum);

		out.close();
	}

	static void shuffle(int[] a) {
		Random r = new Random();
		for(int i = a.length - 1; i > 0; --i) {
			int si = r.nextInt(i);
			int t = a[si];
			a[si] = a[i];
			a[i] = t;
		}
	}

	static void shuffle(long[] a) {
		Random r = new Random();
		for(int i = a.length - 1; i > 0; --i) {
			int si = r.nextInt(i);
			long t = a[si];
			a[si] = a[i];
			a[i] = t;
		}
	}

	static int lower_bound(int[] a, int n, int k) {
		int s = 0;
		int e = n;
		int m;
		while (e - s > 0) {
			m = (s + e) / 2;
			if (a[m] < k)
				s = m + 1;
			else
				e = m;
		}
		return e;
	}
	static int lower_bound(long[] a, int n, long k) {
		int s = 0;
		int e = n;
		int m;
		while (e - s > 0) {
			m = (s + e) / 2;
			if (a[m] < k)
				s = m + 1;
			else
				e = m;
		}
		return e;
	}

	static int gcd(int a, int b) {
		return b == 0 ? a : gcd(b, a % b);
	}
	static long gcd(long a, long b) {
		return b == 0 ? a : gcd(b, a % b);
	}

	static class Pair implements Comparable<Pair> {
		int first, second;

		public Pair(int first, int second) {
			super();
			this.first = first;
			this.second = second;
		}

		@Override
		public int compareTo(Pair o) {
			return this.first != o.first ? this.first - o.first : this.second - o.second;
		}

		@Override
		public int hashCode() {
			final int prime = 31;
			int result = 1;
			result = prime * result + first;
			result = prime * result + second;
			return result;
		}

		@Override
		public boolean equals(Object obj) {
			if (this == obj)
				return true;
			if (obj == null)
				return false;
			if (getClass() != obj.getClass())
				return false;
			Pair other = (Pair) obj;
			if (first != other.first)
				return false;
			if (second != other.second)
				return false;
			return true;
		}
	}

}

class InputReader {

	private final InputStream stream;
	private final byte[] buf = new byte[8192];
	private int curChar, snumChars;

	public InputReader(InputStream st) {
		this.stream = st;
	}

	public int read() {
		if (snumChars == -1)
			throw new InputMismatchException();
		if (curChar >= snumChars) {
			curChar = 0;
			try {
				snumChars = stream.read(buf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (snumChars <= 0)
				return -1;
		}
		return buf[curChar++];
	}

	public int nextInt() {
		int c = read();
		while (isSpaceChar(c)) {
			c = read();
		}
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		int res = 0;
		do {
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}

	public long nextLong() {
		int c = read();
		while (isSpaceChar(c)) {
			c = read();
		}
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		long res = 0;
		do {
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}

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

	public String readString() {
		int c = read();
		while (isSpaceChar(c)) {
			c = read();
		}
		StringBuilder res = new StringBuilder();
		do {
			res.appendCodePoint(c);
			c = read();
		} while (!isSpaceChar(c));
		return res.toString();
	}

	public String nextLine() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		StringBuilder res = new StringBuilder();
		do {
			res.appendCodePoint(c);
			c = read();
		} while (!isEndOfLine(c));
		return res.toString();
	}

	public boolean isSpaceChar(int c) {
		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}

	private boolean isEndOfLine(int c) {
		return c == '\n' || c == '\r' || c == -1;
	}

}


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

public class Main {

	static InputReader in = new InputReader(System.in);
	static PrintWriter out = new PrintWriter(System.out);

	static int MOD = 1000000007;
	static int M = 505;
	static int oo = (int)1e9;

	static int[] di = {-1, 1, 0, 0};
	static int[] dj = {0, 0, -1, 1};

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

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

		PriorityQueue<Integer> pq = new PriorityQueue<>(Collections.reverseOrder());
		long sum = 0;
		for(int i=0; i<n; ++i) {
			int b = in.nextInt();
			sum += (b * m);
			pq.add(b);
		}

		int max = pq.peek();
		int ming = oo;
		for(int i=0; i<m; ++i) {
			int g = in.nextInt();
			ming = Math.min(g, ming);
			if(g < max) {
				System.out.println(-1);
				return;
			}
			sum += (g - max);
		}
		if(ming > max) {
			sum += pq.poll() - pq.poll();
		}
		System.out.println(sum);

		out.close();
	}

	static void shuffle(int[] a) {
		Random r = new Random();
		for(int i = a.length - 1; i > 0; --i) {
			int si = r.nextInt(i);
			int t = a[si];
			a[si] = a[i];
			a[i] = t;
		}
	}

	static void shuffle(long[] a) {
		Random r = new Random();
		for(int i = a.length - 1; i > 0; --i) {
			int si = r.nextInt(i);
			long t = a[si];
			a[si] = a[i];
			a[i] = t;
		}
	}

	static int lower_bound(int[] a, int n, int k) {
		int s = 0;
		int e = n;
		int m;
		while (e - s > 0) {
			m = (s + e) / 2;
			if (a[m] < k)
				s = m + 1;
			else
				e = m;
		}
		return e;
	}
	static int lower_bound(long[] a, int n, long k) {
		int s = 0;
		int e = n;
		int m;
		while (e - s > 0) {
			m = (s + e) / 2;
			if (a[m] < k)
				s = m + 1;
			else
				e = m;
		}
		return e;
	}

	static int gcd(int a, int b) {
		return b == 0 ? a : gcd(b, a % b);
	}
	static long gcd(long a, long b) {
		return b == 0 ? a : gcd(b, a % b);
	}

	static class Pair implements Comparable<Pair> {
		int first, second;

		public Pair(int first, int second) {
			super();
			this.first = first;
			this.second = second;
		}

		@Override
		public int compareTo(Pair o) {
			return this.first != o.first ? this.first - o.first : this.second - o.second;
		}

		@Override
		public int hashCode() {
			final int prime = 31;
			int result = 1;
			result = prime * result + first;
			result = prime * result + second;
			return result;
		}

		@Override
		public boolean equals(Object obj) {
			if (this == obj)
				return true;
			if (obj == null)
				return false;
			if (getClass() != obj.getClass())
				return false;
			Pair other = (Pair) obj;
			if (first != other.first)
				return false;
			if (second != other.second)
				return false;
			return true;
		}
	}

}

class InputReader {

	private final InputStream stream;
	private final byte[] buf = new byte[8192];
	private int curChar, snumChars;

	public InputReader(InputStream st) {
		this.stream = st;
	}

	public int read() {
		if (snumChars == -1)
			throw new InputMismatchException();
		if (curChar >= snumChars) {
			curChar = 0;
			try {
				snumChars = stream.read(buf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (snumChars <= 0)
				return -1;
		}
		return buf[curChar++];
	}

	public int nextInt() {
		int c = read();
		while (isSpaceChar(c)) {
			c = read();
		}
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		int res = 0;
		do {
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}

	public long nextLong() {
		int c = read();
		while (isSpaceChar(c)) {
			c = read();
		}
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		long res = 0;
		do {
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}

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

	public String readString() {
		int c = read();
		while (isSpaceChar(c)) {
			c = read();
		}
		StringBuilder res = new StringBuilder();
		do {
			res.appendCodePoint(c);
			c = read();
		} while (!isSpaceChar(c));
		return res.toString();
	}

	public String nextLine() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		StringBuilder res = new StringBuilder();
		do {
			res.appendCodePoint(c);
			c = read();
		} while (!isEndOfLine(c));
		return res.toString();
	}

	public boolean isSpaceChar(int c) {
		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}

	private boolean isEndOfLine(int c) {
		return c == '\n' || c == '\r' || c == -1;
	}

}


import java.util.*;
import java.io.*;
public class A
{
      public static void main(String ar[]) throws Exception
      {
            BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
            String s1[]=br.readLine().split(" ");
            String s2[]=br.readLine().split(" ");
            String s3[]=br.readLine().split(" ");
            int n=Integer.parseInt(s1[0]);
            int m=Integer.parseInt(s1[1]);
            int a[]=new int[n];
            int b[]=new int[m];
            for(int i=0;i<n;i++)
             a[i]=Integer.parseInt(s2[i]);
            for(int i=0;i<m;i++)
             b[i]=Integer.parseInt(s3[i]);
            Arrays.sort(a);  Arrays.sort(b);
            long S1=0,S2=0;
            for(int i=0;i<n;i++)
             S1+=(long)a[i];
            for(int i=0;i<m;i++)
             S2+=(long)b[i];
            if(a[n-1]>b[0])
             System.out.println("-1");
            else if(a[n-1]==b[0])
            {
                  long S=S1*((long)m) + S2 - ((long)a[n-1])*((long)m);
                  System.out.println(S);
            }
            else
            {
                  long S=S1*((long)m) + S2 - ((long)a[n-1])*((long)(m-1)) -(long)a[n-2];
                  System.out.println(S);
            }
      }
}


import java.util.*;
import java.io.*;
public class A
{
      public static void main(String ar[]) throws Exception
      {
            BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
            String s1[]=br.readLine().split(" ");
            int n=Integer.parseInt(s1[0]);
            int m=Integer.parseInt(s1[1]);

            String s2[]=br.readLine().split(" ");
            long S1=0,S2=0;
            int b[]=new int[n];
            for(int i=0;i<n;i++)
            { b[i]=Integer.parseInt(s2[i]); S1+=(long)b[i]; }

            String s3[]=br.readLine().split(" ");
            int g[]=new int[m];
            for(int i=0;i<m;i++)
            { g[i]=Integer.parseInt(s3[i]); S2+=(long)g[i]; }

            Arrays.sort(b);
            Arrays.sort(g);
            if(g[0]<b[n-1])
             System.out.println("-1");
            else if(g[0]==b[n-1])
            {
                  S1-=(long)b[n-1];
                  System.out.println(m*S1+S2);
            }
            else
            {
                  S1-=b[n-1];
                  System.out.println(m*S1-b[n-2]+b[n-1]+S2);
            }
      }
}


import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

public class Main {

	static class Task {

		int NN = 200005;
		int MOD = 1000000007;
		int INF = 2000000000;
		long INFINITY = 2000000000000000000L;

		public void solve(InputReader in, PrintWriter out) {
			int n = in.nextInt();
			int m = in.nextInt();
			int [] b = new int[n];
			int mx = -1;
			int mx2 = -1;
			for(int i=0;i<n;++i) {
				b[i] = in.nextInt();
				if(b[i] >= mx) {
					mx2 = mx;mx=b[i];
				} else if(b[i] > mx2) {
					mx2 = b[i];
				}
			}
			int [] g= new int[m];
			for(int i=0;i<m;++i) {
				g[i] = in.nextInt();
			}
			for(int i=0;i<m;++i) {
				if(g[i] < mx) {
					out.println(-1);return;
				}
			}
			long ans = 0;
			for(int i=0;i<n;++i) {
				ans += 1L * b[i] * 1L * m;
			}
			int cnt = 0;
			for(int i=0;i<m;++i) {
				if(g[i] > mx) {
					ans += 1L * g[i];
					++cnt;
				}
			}
			if(cnt < m) {
				ans -= 1L * cnt * 1L * mx;
				out.println(ans);
			} else {
				ans -= 1L * (m-1L) * 1L * mx;
				if(n == 1 || m == 1) {
					out.println(-1);return;
				}
				ans -= 1L * mx2;
				out.println(ans);
			}
		}

	}

	static void prepareIO(boolean isFileIO) {
		//long t1 = System.currentTimeMillis();
		Task solver = new Task();
		// Standard IO
		if(!isFileIO) {
			InputStream inputStream = System.in;
	        OutputStream outputStream = System.out;
	        InputReader in = new InputReader(inputStream);
	        PrintWriter out = new PrintWriter(outputStream);
	        solver.solve(in, out);
	        //out.println("time(s): " + (1.0*(System.currentTimeMillis()-t1))/1000.0);
	        out.close();
		}
        // File IO
		else {
			String IPfilePath = System.getProperty("user.home") + "/Downloads/ip.in";
	        String OPfilePath = System.getProperty("user.home") + "/Downloads/op.out";
	        InputReader fin = new InputReader(IPfilePath);
	        PrintWriter fout = null;
	        try {
				fout = new PrintWriter(new File(OPfilePath));
			} catch (FileNotFoundException e) {
				e.printStackTrace();
			}
	        solver.solve(fin, fout);
	        //fout.println("time(s): " + (1.0*(System.currentTimeMillis()-t1))/1000.0);
	        fout.close();
		}
	}

	public static void main(String[] args) {
        prepareIO(false);
	}

	static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

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

        public InputReader(String filePath) {
        	File file = new File(filePath);
            try {
				reader = new BufferedReader(new FileReader(file));
			} catch (FileNotFoundException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
            tokenizer = null;
        }

        public String nextLine() {
        	String str = "";
        	try {
				str = reader.readLine();
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
        	return str;
        }

        public 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());
        }

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

    }

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;
import java.util.stream.Stream;

public class SolutionC {

    public static void main(String[] args) throws IOException {
        Reader reader = new Reader();
        StringTokenizer st = reader.getStringTokenizer();
        int boysNum = reader.getNextInt(st);
        int girlsNum = reader.getNextInt(st);

        long[] boysSweets = reader.readLongNumbers();
        long[] girlsSweets = reader.readLongNumbers();

        long totalSweetsNum = 0;
        Arrays.sort(boysSweets);
        Arrays.sort(girlsSweets);
        long minSumBoys = Arrays.stream(boysSweets).sum();
        totalSweetsNum += (minSumBoys * (long)girlsNum);

        long maxSweetsOfBoys = boysSweets[boysSweets.length - 1];
        long previousMaxSweetsOfBoys = boysSweets[boysSweets.length - 2];
        long minSweetsOfGirls = girlsSweets[0];
        if(maxSweetsOfBoys > minSweetsOfGirls) {
            totalSweetsNum = -1;
            System.out.println(totalSweetsNum);
            return;
        } else if (maxSweetsOfBoys != minSweetsOfGirls){
            totalSweetsNum += (minSweetsOfGirls - previousMaxSweetsOfBoys);
        }

        for(int i = 1; i < girlsSweets.length; i++) {
            long girlMaxSweets = girlsSweets[i];
            if(maxSweetsOfBoys > girlMaxSweets) {
                totalSweetsNum = -1;
                break;
            } else {
                totalSweetsNum += (girlMaxSweets - maxSweetsOfBoys);
            }
        }

        System.out.println(totalSweetsNum);

    }

}

class Reader {

    BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));

    public StringTokenizer getStringTokenizer() throws IOException {
        String line = bufferedReader.readLine().replaceAll("\\s+$", "");
        return new StringTokenizer(line, " ");
    }

    public int getNextInt(StringTokenizer stringTokenizer) {
        while (stringTokenizer.hasMoreTokens()) {
            return Integer.parseInt(stringTokenizer.nextToken());
        }
        throw new RuntimeException("no more tokens in string");
    }

    public long getNextLong(StringTokenizer stringTokenizer) {
        while (stringTokenizer.hasMoreTokens()) {
            return Long.parseLong(stringTokenizer.nextToken());
        }
        throw new RuntimeException("no more tokens in string");
    }

    public String getNextString(StringTokenizer stringTokenizer) {
        while (stringTokenizer.hasMoreTokens()) {
            return stringTokenizer.nextToken();
        }
        throw new RuntimeException("no more tokens in string");
    }

    public String readStringValue() throws IOException {
        return bufferedReader.readLine().replaceAll("\\s+$", "");
    }

    public int readIntValue() throws IOException {
        String line = bufferedReader.readLine().replaceAll("\\s+$", "");
        int parsedToInt = Integer.parseInt(line);
        return parsedToInt;
    }

    public int[] readIntNumbers() throws IOException {
        String[] line = bufferedReader.readLine().replaceAll("\\s+$", "").split(" ");
        int[] parsedToInt = Arrays.stream(line).mapToInt(Integer::parseInt).toArray();
        return parsedToInt;
    }

    public long readLongValue() throws IOException {
        String line = bufferedReader.readLine().replaceAll("\\s+$", "");
        long parsedToLong = Long.parseLong(line);
        return parsedToLong;
    }

    public long[] readLongNumbers() throws IOException {
        String[] line = bufferedReader.readLine().replaceAll("\\s+$", "").split(" ");
        long[] parsedToLong = Arrays.stream(line).mapToLong(Long::parseLong).toArray();
        return parsedToLong;
    }

}


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

public class CC {
    public static void main(String[] args) {
        FastScanner scanner = new FastScanner();
        PrintWriter out = new PrintWriter(System.out);
        HashMap<Integer, Integer> mapping = new HashMap<>();
        int N = scanner.nextInt();
        int M = scanner.nextInt();
        int[] b = new int[N];
        int[] g = new int[M];
        int minB = Integer.MAX_VALUE;
//        int second = Integer.MAX_VALUE;
        int maxB = -1;
        for(int i = 0; i < N; i++) {
            b[i] = scanner.nextInt();
            minB = Math.min(minB, b[i]);
            if (!mapping.containsKey(b[i])) mapping.put(b[i], 1);
            else mapping.put(b[i], mapping.get(b[i]) + 1);
            maxB = Math.max(maxB, b[i]);
        }
        int minG = Integer.MAX_VALUE;
        int maxG = -1;
        for(int i= 0; i < M ; i++) {
            g[i] = scanner.nextInt();
            if (g[i] < maxB) {
                System.out.println(-1);
                return;
            }
            minG = Math.min(minG, g[i]);
            maxG = Math.max(maxG, g[i]);
        }
        if (M == 1) {
            for(int i = 0; i < N; i++) {
                if (b[i] != g[0]) {
                    System.out.println(-1);
                    return;
                }
            }
            System.out.println((long)g[0]*(long)N);
            return;
        }
        Arrays.sort(b);
        long ans = 0;
        for(int i = 0; i < N; i++) {
            ans += (long)b[i] * (long)M;
        }
        int prev= -2;
        boolean bad = true;
        for(int i = 0; i < M; i++) {
            int closest = Arrays.binarySearch(b, g[i]);
            if (closest < 0) closest = - closest -2;
            ans += g[i] - b[closest];
            if (prev != -2 && bad && closest != prev) {
                bad = false;
            }
            prev = closest;
        }
        if (bad) {
            if (mapping.get(b[prev]) == 1 && minG - b[prev] > 0) {
                if (prev == 0) {
                    System.out.println(-1);
                    return;
                }
                ans -= minG- b[prev];
                ans+= minG-b[prev-1];
            }
        }
        out.println(ans);
        out.flush();
    }

    public static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner(Reader in) {
            br = new BufferedReader(in);
        }

        public FastScanner() {
            this(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());
        }

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

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

        String readNextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        int[] readIntArray(int n) {
            int[] a = new int[n];
            for (int idx = 0; idx < n; idx++) {
                a[idx] = nextInt();
            }
            return a;
        }
    }
}


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+=a[i]*m;
        }else{
            for(int i=1; i<n; i++)
                ans+=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 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+=a[i]*m;
        }else{
            for(int i=1; i<n; i++)
                ans+=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;
        }
    }
}