#include <bits/stdc++.h>
using namespace std;
const long long MX = 1e5 + 9;
long long s[MX], b[MX];
bool OK(long long num, long long a, long long n) {
  for (long long i = 0; i < num; i++) {
    a -= max(0LL, b[i] - s[n - num + i]);
  }
  if (a >= 0) return 1;
  return 0;
}
long long BS(long long n, long long m, long long a) {
  long long l = 0, r = min(n, m) + 1;
  while (l + 1 < r) {
    long long mid = (l + r) / 2;
    if (OK(mid, a, n))
      l = mid;
    else
      r = mid;
  }
  return l;
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long n, m, a;
  cin >> n >> m >> a;
  for (long long i = 0; i < n; i++) {
    cin >> s[i];
  }
  sort(s, s + n);
  for (long long i = 0; i < m; i++) {
    cin >> b[i];
  }
  sort(b, b + m);
  long long ans = BS(n, m, a);
  long long sum = 0;
  for (long long i = 0; i < ans; i++) {
    sum += b[i];
  }
  cout << ans << " " << max(0LL, sum - a);
  return 0;
}
