#include <bits/stdc++.h>
using namespace std;
long long n, m, a;
long long poc[100009], bike[100009];
bool check(long long bn) {
  long long ase = a;
  for (long long i = 1, j = bn; i <= bn; i++, j--) {
    long long dibo = min(bike[j], poc[i]);
    long long need = bike[j] - dibo;
    if (ase >= need)
      ase -= need;
    else
      return 0;
  }
  return 1;
}
int main() {
  cin >> n >> m >> a;
  for (long long i = 1; i <= n; i++) scanf("%lld", &poc[i]);
  for (long long i = 1; i <= m; i++) scanf("%lld", &bike[i]);
  sort(poc + 1, poc + n + 1, greater<long long>());
  sort(bike + 1, bike + m + 1);
  long long lo = 0, hi = min(m, n), r = 0, s = 0, ret;
  while (lo <= hi) {
    long long mid = (lo + hi) / 2;
    if (check(mid)) {
      r = mid;
      lo = mid + 1;
    } else
      hi = mid - 1;
  }
  long long sum = 0;
  for (long long i = 1; i <= r; i++) sum += bike[i];
  s = sum - a;
  cout << r << " " << max(s, 0LL) << endl;
  return 0;
}
