#include <bits/stdc++.h>
using namespace std;
int n, m;
long long a, b[100005], p[100005], backup[100005];
bool OK(int idx) {
  for (int i = 1; i <= m; i++) backup[i] = p[i];
  reverse(p + 1, p + idx + 1);
  long long diff = 0, tot = 0;
  for (int i = 1; i <= idx; i++) {
    tot += p[i];
    diff += max(0LL, p[i] - b[i]);
  }
  bool flag = true;
  if (diff > a) flag = false;
  for (int i = 1; i <= m; i++) p[i] = backup[i];
  return flag;
}
long long init(int idx) {
  reverse(p + 1, p + idx + 1);
  long long diff = 0, tot = 0;
  for (int i = 1; i <= idx; i++) {
    tot += p[i];
    diff += max(0LL, p[i] - b[i]);
  }
  long long nd = tot - diff;
  long long ld = a - diff;
  return nd - min(ld, nd);
}
void solve() {
  int ret = 0;
  long long ans = 0;
  int lo = 0, hi = min(n, m);
  while (lo <= hi) {
    int mid = (lo + hi) / 2;
    if (OK(mid))
      lo = mid + 1, ret = mid;
    else
      hi = mid - 1;
  }
  ans = init(ret);
  cout << ret << ' ' << ans << endl;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m >> a;
  for (int i = 1; i <= n; i++) cin >> b[i];
  for (int i = 1; i <= m; i++) cin >> p[i];
  sort(b + 1, b + n + 1);
  reverse(b + 1, b + n + 1);
  sort(p + 1, p + m + 1);
  solve();
  return 0;
}
