#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, a;
  cin >> n >> m >> a;
  int b[n], p[m];
  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 l = 0, r = min(m, n), t, temp, cnt;
  long long int mid, sum = 0, ans;
  while (l <= r) {
    mid = (l + r) / 2;
    temp = a;
    sum = 0;
    for (int i = 0; i < mid; i++) {
      if (p[i] - b[i + n - mid] < 0) {
        t = 0;
      } else {
        t = p[i] - b[i + n - mid];
      }
      sum += p[i];
      temp -= t;
      if (temp < 0) {
        break;
      }
    }
    if (temp < 0) {
      r = mid - 1;
    } else {
      if (sum - a < 0) {
        ans = 0;
      } else
        ans = sum - a;
      l = mid + 1;
      cnt = mid;
    }
  }
  cout << cnt << " " << ans << endl;
}
