#include <bits/stdc++.h>
using namespace std;
template <class T1, class T2>
istream &operator>>(istream &is, pair<T1, T2> &p) {
  return is >> p.first >> p.second;
}
template <class T1, class T2>
ostream &operator<<(ostream &os, pair<T1, T2> &p) {
  return os << p.first << " " << p.second;
}
const long long N = 100005;
long long n, m, a;
long long b[N], p[N];
bool check(long long k) {
  if (!k) return 1;
  long long t = a;
  for (long long i = 0; i < k; i++) t -= max(0ll, p[i] - b[n - k + i]);
  return t >= 0;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.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 l = 0, r = min(n, m);
  while (l + 1 < r) {
    long long mid = (l + r) >> 1;
    if (check(mid))
      l = mid;
    else
      r = mid;
  }
  long long ans = l;
  if (check(r)) ans = r;
  long long sum = 0;
  for (long long i = 0; i < ans; i++) sum += p[i];
  cout << ans << " " << max(0ll, sum - a);
}
