#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
long long n, m, a;
long long b[N], p[N];
long long ba[N], pa[N];
bool eval(int mid) {
  if (a + ba[mid] < pa[mid] || mid >= m) return false;
  vector<int> p1, b1;
  p1.resize(mid + 1);
  b1.resize(mid + 1);
  for (int i = 0; i < mid + 1; i++) p1[i] = p[i];
  for (int i = 0; i < mid + 1; i++) b1[i] = b[i];
  sort(b1.begin(), b1.end());
  long long cur_a = a;
  for (int i = 0; i < mid + 1; i++) {
    cur_a -= max(0ll, (long long)p1[i] - b1[i]);
  }
  if (cur_a < 0) return false;
  return true;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> m >> a;
  for (int i = 0; i < n; i++) cin >> b[i];
  for (int i = 0; i < m; i++) cin >> p[i];
  sort(b, b + n, [](int v1, int v2) { return v1 > v2; });
  sort(p, p + m, [](int v1, int v2) { return v1 < v2; });
  ba[0] = b[0];
  pa[0] = p[0];
  for (int i = 0; i < n - 1; i++) ba[i + 1] = ba[i] + b[i + 1];
  for (int i = 0; i < m - 1; i++) pa[i + 1] = pa[i] + p[i + 1];
  int lo = 0, hi = n - 1, mid;
  while (lo < hi - 1) {
    mid = (lo + hi) / 2;
    if (eval(mid))
      lo = mid;
    else
      hi = mid - 1;
  }
  int pos = 0;
  if (eval(hi))
    pos = hi;
  else
    pos = lo;
  if (pos == 0 && a + ba[0] < pa[0]) {
    cout << "0 0" << endl;
    return 0;
  }
  vector<int> p1, b1;
  p1.resize(pos + 1);
  b1.resize(pos + 1);
  for (int i = 0; i < pos + 1; i++) p1[i] = p[i];
  for (int i = 0; i < pos + 1; i++) b1[i] = b[i];
  sort(b1.begin(), b1.end());
  long long res = 0, all = 0;
  for (int i = 0; i < pos + 1; i++) {
    long long add = max(0ll, (long long)p1[i] - b1[i]);
    all += min(p1[i], b1[i]);
    res += add;
    a -= add;
  }
  cout << pos + 1 << " " << max(0ll, all - a) << endl;
  return 0;
}
