#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T poww(T b, T p) {
  long long a = 1;
  while (p) {
    if (p & 1) {
      a = (a * b);
    }
    p >>= 1;
    b = (b * b);
  }
  return a;
}
template <class T>
inline T modpoww(T b, T p, T mmod) {
  long long a = 1;
  while (p) {
    if (p & 1) {
      a = (a * b) % mmod;
    }
    p >>= 1;
    b = (b * b) % mmod;
  }
  return a % mmod;
}
template <class T>
inline T gcd(T a, T b) {
  if (b > a) return gcd(b, a);
  return ((b == 0) ? a : gcd(b, a % b));
}
template <class T>
inline void scan(vector<T>& a, int n) {
  T b;
  int i;
  for ((i) = 0; (i) < (n); (i) += 1) {
    cin >> b;
    a.push_back(b);
  }
}
inline void scanlld(vector<long long>& a, int n) {
  long long b;
  int i;
  for ((i) = 0; (i) < (n); (i) += 1) {
    scanf("%lld", &(b));
    a.push_back(b);
  }
}
vector<long long> b, p;
long long sm[100010], smp[100010];
int main() {
  int i, j, m, n, st;
  long long k, h, a, s = 0;
  cin >> n >> m >> a;
  scanlld(b, n);
  scanlld(p, m);
  sort((b).begin(), (b).end());
  sort((p).begin(), (p).end());
  sm[0] = b[0];
  smp[0] = p[0];
  for ((i) = (1); (i) < (n); (i) += 1) {
    sm[i] = sm[i - 1] + b[i];
  };
  for ((i) = (1); (i) < (m); (i) += 1) {
    smp[i] = smp[i - 1] + p[i];
  };
  st = 0;
  if (m < n) {
    st = n - m;
  }
  i = st;
  while (sm[n - 1] - sm[i] + b[i] + a < smp[n - 1 - i]) {
    i++;
    if (i == n) break;
  }
  for (; i < n; i++) {
    h = 0;
    for ((j) = (i); (j) < (n); (j) += 1) {
      if (b[j] >= p[j - i])
        continue;
      else
        h += p[j - i] - b[j];
    }
    if (h <= a) break;
  }
  if (i == n) {
    cout << "0 0\n";
  } else {
    k = (smp[n - 1 - i] - a);
    if (k < 0) k = 0;
    cout << n - i << " " << k << "\n";
  }
}
