#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, m, ans = 0;
  cin >> n >> m;
  vector<long long> b(n), g(m);
  for (long long i = 0; i < n; i++) cin >> b[i];
  long long mx = 0, mn = 1e18;
  for (long long i = 0; i < m; i++) {
    cin >> g[i];
    mn = min(mn, g[i]);
    mx = max(mx, g[i]);
  }
  for (long long i = 0; i < n; i++) {
    if (b[i] > mx || b[i] > mn) {
      cout << -1;
      return;
    }
  }
  sort(b.rbegin(), b.rend());
  sort(g.begin(), g.end());
  if (binary_search(g.begin(), g.end(), b[0])) {
    for (long long i = 0; i < m; i++) ans += g[i];
    for (long long i = 1; i < n; i++) ans += b[i] * m;
  } else {
    ans += b[0];
    for (long long i = 1; i < m; i++) ans += g[i];
    ans += g[0];
    ans += b[1] * (m - 1);
    for (long long i = 2; i < n; i++) ans += b[i] * m;
  }
  cout << ans;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  solve();
  return 0;
}
