#include <bits/stdc++.h>
using namespace std;
long long int mod = 998244353;
long long int power(long long int a, long long int b) {
  if (b == 0)
    return 1;
  else if (b % 2 == 0) {
    return power(a * a % mod, b / 2);
  } else
    return (a % mod * power(a * a % mod, b / 2)) % mod;
}
int root(int a[], int i) {
  while (a[i] != i) {
    a[i] = a[a[i]];
    i = a[i];
  }
  return i;
}
void un(int a[], int size[], int x, int y) {
  int p = root(a, x);
  int q = root(a, y);
  if (size[p] < size[q]) {
    a[p] = a[q];
    size[q] += size[p];
  } else {
    a[q] = a[p];
    size[p] += size[q];
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int boys, girls;
  cin >> boys >> girls;
  long long int a[boys], b[girls];
  for (int i = 0; i < boys; ++i) cin >> a[i];
  for (int j = 0; j < girls; ++j) cin >> b[j];
  sort(a, a + boys);
  sort(b, b + girls);
  if (a[boys - 1] > b[0]) {
    cout << -1 << '\n';
    return 0;
  }
  long long int ans = 0;
  sort(b, b + girls, greater<long long int>());
  sort(a, a + boys, greater<long long int>());
  long long int count = 0;
  for (int i = 0; i < boys; ++i) {
    int temp = 0;
    long long int sum = 0;
    if (count == girls) {
      ans += a[i] * girls;
      continue;
    }
    int check = 0;
    for (int j = count;; ++j) {
      if (count == girls || temp == girls) {
        break;
      }
      if (b[j] > a[i]) {
        temp++;
        sum += b[j];
        count++;
      } else if (b[j] == a[i]) {
        temp++;
        sum += b[j];
        count++;
        check = 1;
      } else {
        break;
      }
    }
    if (check == 1) {
      if (temp == girls) {
        ans += sum;
      } else {
        ans += (girls - temp) * a[i] + sum;
      }
    } else if (temp < girls) {
      ans += (girls - temp) * a[i] + sum;
    } else {
      sum = sum - b[count - 1];
      count--;
      temp--;
      ans += (girls - temp) * a[i] + sum;
    }
  }
  cout << ans << '\n';
  return 0;
}
