#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
int n, m;
long long a, b[N], p[N], sp[N];
bool judge(int x) {
  int i;
  long long sum = a;
  for (i = 1; i <= x; ++i)
    if (b[n - x + i] < p[i]) sum -= p[i] - b[n - x + i];
  return sum >= 0;
}
int main() {
  cin >> n >> m >> a;
  int i;
  for (i = 1; i <= n; ++i) cin >> b[i];
  for (i = 1; i <= m; ++i) cin >> p[i];
  sort(b + 1, b + n + 1);
  sort(p + 1, p + m + 1);
  for (i = 1; i <= m; ++i) sp[i] = sp[i - 1] + p[i];
  int l = 0, r = min(n, m), h, ans = 0;
  while (l <= r) {
    h = (l + r) >> 1;
    if (judge(h)) {
      ans = h;
      l = h + 1;
    } else
      r = h - 1;
  }
  long long tot = sp[ans] - a;
  cout << ans << " " << max(0LL, tot) << endl;
  return 0;
}
