#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 100;
struct stu {
  int first, cost, second;
};
bool operator<(stu a, stu b) {
  if (a.cost != b.cost)
    return a.cost < b.cost;
  else
    return a.second < b.second;
}
bool stust(stu a, stu b) {
  if (a.first != b.first)
    return a.first > b.first;
  else
    return a.second < b.second;
}
stu all[MAXN];
pair<int, int> bugs[MAXN];
int AnS[MAXN];
int n, m, s;
bool can(int k) {
  int up = 0, adin = 0;
  int cost = 0;
  set<stu> here;
  while (up < m) {
    while (adin < n and all[adin].first >= bugs[up].first)
      here.insert(all[adin++]);
    if (here.empty()) return false;
    stu now = *here.begin();
    cost += now.cost;
    if (cost > s) return false;
    here.erase(now);
    int i, j;
    for (i = 0, j = up; i < k and j < m; i++, j++) {
      AnS[bugs[j].second] = now.second;
      up = j + 1;
    }
  }
  return true;
}
int main() {
  int maxbug = 0, maxhave = 0;
  cin >> n >> m >> s;
  for (int i = 0; i < m; ++i) {
    cin >> bugs[i].first;
    maxbug = max(maxbug, bugs[i].first);
    bugs[i].second = i;
  }
  sort(bugs, bugs + m, greater<pair<int, int> >());
  for (int i = 0; i < n; ++i) {
    cin >> all[i].first;
    all[i].second = i;
  }
  for (int i = 0; i < n; ++i) {
    cin >> all[i].cost;
    if (all[i].cost <= s) maxhave = max(maxhave, all[i].first);
  }
  sort(all, all + n, stust);
  if (maxhave < maxbug) {
    cout << "NO" << endl;
    return 0;
  }
  cout << "YES" << endl;
  int up = m, down = 1, ans = m;
  while (up >= down) {
    int mid = (up + down) / 2;
    if (can(mid)) {
      ans = min(ans, mid);
      up = mid - 1;
    } else
      down = mid + 1;
  }
  can(ans);
  for (int i = 0; i < m; ++i) cout << AnS[i] + 1 << " ";
  cout << endl;
  return 0;
}
