#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, m;
  cin >> n >> m;
  vector<long long> a(n), b(m);
  long long ans = 0;
  for (auto& x : a) {
    cin >> x;
  }
  sort(a.begin(), a.end());
  for (auto& x : b) {
    cin >> x;
  }
  sort(b.begin(), b.end());
  int j = m - 1;
  for (int i = n - 1; i >= 0; i--) {
    long long ans_ = ans;
    if (b[0] < a[i]) {
      cout << -1;
      return;
    }
    int given = 0;
    while ((given < m - 1 || b[j] == a[i]) && j >= 0) {
      ans += b[j];
      given++;
      j--;
    }
    ans += (m - given) * a[i];
  }
  if (j >= 0) {
    cout << -1;
    return;
  }
  cout << ans;
}
signed main() {
  solve();
  cout << '\n';
  return 0;
}
