#include <bits/stdc++.h>
using namespace std;
const int N = 2e6 + 20;
const long long inf = 1e10;
long long b[N], p[N], a, n, m;
bool check(int x) {
  if (n < x || m < x) return false;
  long long tmp = 0;
  vector<long long> u;
  for (int i = 0; i < x; i++) u.push_back(b[i]);
  reverse(u.begin(), u.end());
  for (int i = 0; i < x; i++) tmp += max(0ll, p[i] - u[i]);
  if (tmp <= a) return true;
  return false;
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  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, greater<int>());
  sort(p, p + m);
  int l = 0, r = m + 1, tmp = 0;
  while (l < r) {
    int mid = (r + l) / 2;
    if (check(mid))
      tmp = mid, l = mid + 1;
    else
      r = mid;
  }
  cout << tmp << " ";
  long long ans = 0;
  for (int i = 0; i < tmp; i++) ans += p[i];
  cout << max(0ll, ans - a);
  return 0;
}
