#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m;
  cin >> n >> m;
  map<long long, long long> s;
  set<long long> s2;
  long long ret = 0;
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    ret += x * m;
    s[x] += m - 1;
    s2.insert(x);
  }
  vector<long long> a(m);
  for (long long i = 0; i < m; i++) {
    cin >> a[i];
  }
  sort(a.rbegin(), a.rend());
  for (long long i = 0; i < m; i++) {
    if (a[i] < *s2.rbegin()) {
      cout << -1 << endl;
      return 0;
    }
    if (!s2.count(a[i])) {
      auto it = s.upper_bound(a[i]);
      it = (it == s.begin()) ? s.end() : std::prev(it);
      if (it == s.end()) {
        cout << a[i] << endl;
        cout << -1 << endl;
        return 0;
      }
      if (it->first != a[i]) {
        it->second--;
        ret += (a[i] - it->first);
        if (it->second == 0) {
          s.erase(it);
        }
      }
    }
  }
  cout << ret << endl;
  return 0;
}
