#include <bits/stdc++.h>
using namespace std;
const int N = 100100;
int n, m, a, b[N], p[N];
int main() {
  cin >> n >> m >> a;
  for (int i = 0; i < n; ++i) cin >> b[i];
  sort(b, b + n);
  for (int i = 0; i < m; ++i) cin >> p[i];
  sort(p, p + m);
  int lo = 0, hi = min(n, m) - 1;
  while (lo <= hi) {
    int md = (lo + hi) >> 1;
    int t = a;
    for (int i = 0; i <= md && t >= 0; ++i)
      t -= max(0, p[i] - b[n - 1 - md + i]);
    if (t < 0)
      hi = md - 1;
    else
      lo = md + 1;
  }
  int s = 0;
  for (int i = 0; i < lo; ++i) s += p[i];
  cout << lo << " " << (lo ? max(0, s - a) : 0) << endl;
}
