#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100100;
const int costMax = 1 << 30;
int n, m, s, sol[MAXN];
pair<int, int> a[MAXN];
pair<int, pair<int, int> > b[MAXN];
priority_queue<pair<int, int> > heap;
bool have_sol(int days) {
  int pa = m, pb = n, bani = s;
  while (!heap.empty()) heap.pop();
  while (pa > 0) {
    while (pb > 0 && b[pb].first >= a[pa].first) {
      heap.push(make_pair(costMax - b[pb].second.first, b[pb].second.second));
      --pb;
    }
    if (heap.empty()) return 0;
    pair<int, int> t = heap.top();
    heap.pop();
    t.first = costMax - t.first;
    bani -= t.first;
    if (bani < 0) return 0;
    for (int i = pa; i > 0 && i > pa - days; --i) sol[a[i].second] = t.second;
    pa -= days;
  }
  return 1;
}
bool cautare_binara() {
  int st = 1, dr = m, last = -1;
  while (st <= dr) {
    int mid = (st + dr) / 2;
    if (have_sol(mid)) {
      last = mid;
      dr = mid - 1;
    } else
      st = mid + 1;
  }
  if (last == -1) return 0;
  return have_sol(last);
}
int main() {
  cin >> n >> m >> s;
  for (int i = 1; i <= m; ++i) {
    int x;
    cin >> x;
    a[i] = make_pair(x, i);
  }
  for (int i = 1; i <= n; ++i) cin >> b[i].first;
  for (int i = 1; i <= n; ++i) {
    cin >> b[i].second.first;
    b[i].second.second = i;
  }
  sort(a + 1, a + m + 1);
  sort(b + 1, b + n + 1);
  if (cautare_binara()) {
    cout << "YES\n";
    for (int i = 1; i <= m; ++i) cout << sol[i] << " ";
  } else
    cout << "NO";
  return 0;
}
