#include <bits/stdc++.h>
using namespace std;
long long n, m, k, l, r, c = 0, d, sum = 0, a, b, x, y, z, v, s, c1, c2, id,
                         mx = -1, flg = 0;
long long B[2000001 + 5], G[2000001 + 5];
vector<long long> V;
set<long long> S;
map<long long, long long> Mp;
priority_queue<long long> Pq;
char str[500];
void solve() {
  sort(B, B + n, greater<long long>());
  sort(G, G + m, greater<long long>());
  if (B[0] > G[m - 1]) {
    printf("-1\n");
    return;
  }
  id = 0;
  c = 0;
  if (n == 1 || m == 1) {
    if (n == 1 && m == 1) {
      if (B[0] == G[0])
        c += B[0];
      else {
        printf("-1\n");
        return;
      }
    } else if (n == 1) {
      if (B[0] != G[m - 1]) {
        printf("-1\n");
        return;
      } else {
        for (long long i = 0; i < m; i++) c += G[i];
      }
    } else {
      if (B[0] != G[0]) {
        printf("-1\n");
        return;
      } else {
        for (long long i = 0; i < n; i++) c += B[i];
      }
    }
  } else {
    for (long long i = 0; i < m - 1; i++) {
      c += G[i];
    }
    c += B[0];
    if (B[0] == G[m - 1]) {
      c += (B[1] * m);
    } else
      c += (G[m - 1] + (B[1] * (m - 1)));
    for (long long i = 2; i < n; i++) {
      c += (B[i] * m);
    }
  }
  printf("%I64d\n", c);
}
int main() {
  scanf("%I64d%I64d", &n, &m);
  for (long long i = 0; i < n; i++) {
    scanf("%I64d", &B[i]);
  }
  for (long long i = 0; i < m; i++) {
    scanf("%I64d", &G[i]);
  }
  solve();
  return 0;
}
