#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long int LINF = 0x3f3f3f3f3f3f3f3fll;
const long double pi = acos(-1);
const int MOD = 1e9 + 7;
const int N = 1e5 + 100;
int n, m, s;
pair<pair<int, int>, int> v[N];
pair<int, int> a[N];
int r[N];
bool simula(int dias) {
  long long int totcost = 0;
  priority_queue<pair<pair<int, int>, int>, vector<pair<pair<int, int>, int> >,
                 greater<pair<pair<int, int>, int> > >
      pq;
  int j = 0;
  for (int i = 0; i < m; i++) {
    int val = a[i].first;
    int cara = a[i].second;
    while (j <= n and v[j].first.first >= val) {
      pq.push(make_pair(make_pair(v[j].first.second, v[j].second), dias));
      j++;
    }
    if (pq.empty()) {
      return 0;
    }
    pair<pair<int, int>, int> topo = pq.top();
    pq.pop();
    totcost += topo.first.first;
    r[cara] = topo.first.second;
    topo.second--;
    if (topo.second > 0) {
      topo.first.first = 0;
      pq.push(topo);
    }
  }
  return totcost <= s;
}
int bb(int b, int e) {
  if (b == e) return b;
  int mid = (b + e) / 2;
  if (simula(mid)) return bb(b, mid);
  return bb(mid + 1, e);
}
int main() {
  scanf("%d%d%d", &n, &m, &s);
  for (int i = 0; i < m; i++) {
    scanf("%d", &a[i].first);
    a[i].second = i;
  }
  for (int i = 0; i < n; i++) scanf("%d", &v[i].first.first);
  for (int i = 0; i < n; i++) scanf("%d", &v[i].first.second);
  for (int i = 0; i < n; i++) v[i].second = i + 1;
  sort(v, v + n);
  reverse(v, v + n);
  sort(a, a + m);
  reverse(a, a + m);
  int x = bb(1, m);
  if (simula(x)) {
    puts("YES");
    for (int i = 0; i < m; i++) printf("%d ", r[i]);
    cout << endl;
  } else {
    puts("NO");
  }
  return 0;
}
