#include <bits/stdc++.h>
using namespace std;
const int mod = int(1e9 + 7);
const double PI = acos(-1.0);
const int N = 200000;
long long n, a;
long long p[N], b[N];
bool check(int x) {
  long long i, m;
  m = a;
  for (i = 0; i < x; i++)
    if (b[n - x + i] < p[i]) m -= p[i] - b[n - x + i];
  return (m >= 0);
}
int main() {
  long long m, l, r, i;
  cin >> n >> m >> a;
  for (i = 0; i < n; i++) cin >> b[i];
  for (i = 0; i < m; i++) cin >> p[i];
  sort(b, b + n);
  sort(p, p + m);
  l = 0;
  r = min(n, m);
  while (l < r) {
    m = (l + r + 1) / 2;
    if (check(m))
      l = m;
    else
      r = m - 1;
  }
  m = 0;
  for (i = 0; i < l; i++) m += p[i];
  cout << l << " " << max(0ll, m - a);
  return 0;
}
