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