#include <bits/stdc++.h>
using namespace std;
long long fun(int b[], int p[], int n, long long &x) {
  long long s = 0;
  x = 0;
  for (int i = 0; i < n; i++) {
    if (b[i] < p[i]) {
      s += (long long)(p[i] - b[i]);
    }
    x += (long long)min(b[i], p[i]);
  }
  return s;
}
int main() {
  int n, m, a;
  scanf("%d%d%d", &n, &m, &a);
  int b[n];
  int p[m];
  for (int i = 0; i < n; i++) scanf("%d", &b[i]);
  for (int i = 0; i < m; i++) scanf("%d", &p[i]);
  sort(b, b + n);
  sort(p, p + m);
  int low = 0, hig = min(m, n);
  long long x;
  while (hig - low > 1) {
    int md = (hig + low) / 2;
    if (fun(b + (n - md), p, md, x) <= a)
      low = md;
    else
      hig = md;
  }
  long long r;
  if (r = fun(b + (n - hig), p, hig, x), r <= a) {
    cout << hig << " " << max(0ll, x - (a - r)) << endl;
  } else if (r = fun(b + (n - low), p, low, x), r <= a) {
    cout << low << " " << max(0ll, x - (a - r)) << endl;
  } else
    puts("0 0");
}
