#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 9;
long long n, m, a, ans;
long long p[N], b[N];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m >> a;
  for (long long i = 0; i < (n); i++) cin >> b[i];
  for (long long i = 0; i < (m); i++) cin >> p[i];
  sort(b, b + n);
  sort(p, p + m);
  long long lo = 0, hi = min(n, m) + 1;
  while (hi - lo > 1) {
    long long mid = (lo + hi) >> 1;
    long long res = 0;
    for (long long i = 0; i < (mid); i++)
      res += max(0ll, p[i] - b[n - mid + i]);
    if (res <= a)
      lo = mid;
    else
      hi = mid;
  }
  for (long long i = 0; i < (lo); i++) ans += p[i];
  cout << lo << ' ' << max(0ll, ans - a) << endl;
}
