#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m, a;
  cin >> n >> m >> a;
  vector<long long int> b;
  vector<long long int> p;
  long long int ar[m];
  long long int prefix[m];
  for (int i = 0; i < n; i++) {
    int item;
    cin >> item;
    b.push_back(item);
  }
  for (int i = 0; i < m; i++) cin >> ar[i];
  sort(ar, ar + m);
  if (m > n) m = n;
  for (int i = 0; i < m; i++) p.push_back(ar[i]);
  sort(b.begin(), b.end());
  sort(p.begin(), p.end());
  prefix[0] = p[0];
  for (long long int i = 1; i < m; i++) prefix[i] = prefix[i - 1] + p[i];
  long long int high = m, low = 0;
  long long int mid;
  int flag;
  while (high >= low) {
    mid = (high + low) / 2;
    long long int k = n - mid;
    long long int tempa = a;
    flag = 1;
    for (int i = 0; i < mid; i++) {
      if (b[k] >= p[i]) {
        k++;
        continue;
      }
      if (b[k] < p[i]) {
        if (tempa >= p[i] - b[k]) {
          tempa = tempa - (p[i] - b[k]);
          k++;
        } else if (tempa < p[i] - b[k]) {
          flag = 0;
          break;
        }
      }
    }
    if (flag == 1)
      low = mid + 1;
    else
      high = mid - 1;
  }
  long long int sum = 0;
  if (flag == 0) mid = mid - 1;
  if (mid != 0) sum = prefix[mid - 1];
  if (a >= sum)
    sum = 0;
  else
    sum = sum - a;
  cout << mid << " " << sum << endl;
  return 0;
}
