#include <bits/stdc++.h>
using namespace std;
long long n, m, a, b[100005], p[100005];
int main() {
  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);
  sort(p, p + m);
  long long l = 0, r = min(m, n), ans = 0, pbb = 0;
  while (l <= r) {
    long long mid = (l + r) / 2;
    long long al = 0, use = a;
    for (int i = 0; i < (mid); i++) {
      al += p[i];
      use += min(b[n - mid + i], p[i]);
    }
    if (use >= al) {
      ans = mid;
      l = mid + 1;
      pbb = al - a;
    } else
      r = mid - 1;
  }
  cout << ans << ' ' << max(pbb, 0ll) << endl;
  return 0;
}
