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