#include <bits/stdc++.h>
using namespace std;
long long int brr[100005], crr[100005];
pair<long long int, int> arr[100005];
long long int final[100005];
set<pair<pair<long long int, long long int>, int>> myset;
priority_queue<pair<long long int, int>> heap;
int main() {
  long long int n, m, s, ans = 1e9;
  set<pair<pair<long long int, long long int>, int>>::iterator itr;
  set<pair<pair<long long int, long long int>, int>>::iterator pre;
  cin >> n >> m >> s;
  for (int i = 0; i < m; i++) {
    cin >> arr[i].first;
    arr[i].second = i;
  }
  for (int i = 0; i < n; i++) cin >> brr[i];
  for (int i = 0; i < n; i++) {
    cin >> crr[i];
    myset.insert({make_pair(brr[i], crr[i]), i});
  }
  sort(arr, arr + m, greater<pair<long long int, long long int>>());
  long long int high = m;
  long long int low = 1;
  long long int mid, count, cost;
  bool check;
  while (low <= high) {
    mid = (low + high) >> 1;
    count = cost = 0;
    check = true;
    pre = myset.end();
    while (count < m) {
      itr = myset.lower_bound({{arr[count].first, 0}, 0});
      if (itr == myset.end()) {
        check = false;
        break;
      }
      for (set<pair<pair<long long int, long long int>, int>>::iterator i = itr;
           i != pre; i++)
        heap.push({-i->first.second, i->second});
      if (heap.empty()) {
        check = false;
        break;
      }
      pre = itr;
      cost -= heap.top().first;
      heap.pop();
      count += mid;
    }
    if (cost > s) check = false;
    if (check) {
      if (ans > mid) ans = mid;
      high = mid - 1;
    } else
      low = mid + 1;
    while (!heap.empty()) heap.pop();
  }
  if (ans == 1e9)
    cout << "NO\n";
  else {
    cout << "YES\n";
    count = 0;
    pre = myset.end();
    while (count < m) {
      itr = myset.lower_bound({{arr[count].first, 0}, 0});
      for (set<pair<pair<long long int, long long int>, int>>::iterator i = itr;
           i != pre; i++)
        heap.push({-i->first.second, i->second});
      for (int i = count; i < count + ans && i < m; i++)
        final[arr[i].second] = heap.top().second + 1;
      heap.pop();
      pre = itr;
      count += ans;
    }
    for (int i = 0; i < m; i++) cout << final[i] << ' ';
    cout << '\n';
  }
  return 0;
}
