#include <bits/stdc++.h>
using namespace std;
const int MAX_TABLE = 1e5 + 7;
int boys_money[MAX_TABLE];
int bikes_cost[MAX_TABLE];
int n_boys, n_bikes, budget;
bool CanWeAchieveBikes(int n_checked_bikes) {
  int act_budget, diff, i;
  if (n_checked_bikes > n_boys) return false;
  act_budget = budget;
  for (i = 0; i < n_checked_bikes; ++i) {
    diff = boys_money[n_boys - i - 1] - bikes_cost[n_checked_bikes - i - 1];
    if (diff >= 0) continue;
    act_budget = act_budget + diff;
    if (act_budget < 0) return false;
  }
  return true;
}
int BinSearchRight_Result(int left, int right) {
  while (left < right) {
    int mid = (left + right + 1) / 2;
    if (CanWeAchieveBikes(mid) == true)
      left = mid;
    else
      right = mid - 1;
  }
  return left;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int bikes_boys_can_rent, renting_cost = 0, money_required;
  int i;
  cin >> n_boys >> n_bikes >> budget;
  for (i = 0; i < n_boys; ++i) cin >> boys_money[i];
  for (i = 0; i < n_bikes; ++i) cin >> bikes_cost[i];
  sort(boys_money, boys_money + n_boys);
  sort(bikes_cost, bikes_cost + n_bikes);
  bikes_boys_can_rent = BinSearchRight_Result(0, n_bikes);
  for (i = 0; i < bikes_boys_can_rent; ++i) renting_cost += bikes_cost[i];
  money_required = renting_cost - budget;
  money_required = max(money_required, 0);
  cout << bikes_boys_can_rent << " " << money_required << "\n";
}
