#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, m, cnt = 0;
  long long mx1, mx2, a, out = 0;
  cin >> n >> m;
  mx1 = mx2 = 0;
  for (int i = 0; i < n; i++) {
    cin >> a;
    if (a > mx1) {
      mx2 = mx1;
      mx1 = a;
    } else if (a > mx2)
      mx2 = a;
    out += a * m;
  }
  for (int i = 0; i < m; i++) {
    cin >> a;
    if (a == mx1)
      continue;
    else if (a < mx1) {
      out = -1;
      break;
    } else {
      out += a - mx1;
      cnt++;
    }
  }
  if (out == -1) {
    cout << -1;
    return 0;
  }
  if (cnt == m) out += (mx1 - mx2);
  cout << out;
}
