#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> boys;
  vector<int> girls;
  long long int sum = 0;
  int maxofmin = 0;
  for (int i = 0; i < n; i++) {
    int c;
    cin >> c;
    boys.push_back(c);
    if (c > maxofmin) maxofmin = c;
  }
  for (int i = 0; i < m; i++) {
    int c;
    cin >> c;
    girls.push_back(c);
    if (c < maxofmin) {
      cout << -1;
      return 0;
    }
  }
  sort(boys.begin(), boys.end());
  sort(girls.begin(), girls.end());
  int index = m - 1;
  for (int i = n - 1; i >= 0; i--) {
    int count = 0;
    for (int j = index; j >= 0; j--) {
      if (girls[j] >= boys[i] && count < m - 1) {
        sum += girls[j];
        index--;
        count++;
      } else if (girls[j] == boys[i] && count == m - 1) {
        sum += girls[j];
        index--;
        count++;
      }
    }
    sum = sum + ((m - count) * (long long int)boys[i]);
  }
  cout << sum << '\n';
}
