#include <bits/stdc++.h>
using namespace std;
const long double eps = 1e-9;
const int inf = LONG_MAX;
const long long inf64 = LLONG_MAX;
const long double pi = 3.1415926535897932384626433832795;
struct st {
  int x, y, z;
};
bool cmp(const st& a, const st& b) { return a.x < b.x; }
bool cmp1(const st& a, const st& b) { return a.y > b.y; }
st a[300000];
st b[300000];
int asn[300000];
int n, m, k;
vector<st> hp;
bool doit(int dd) {
  hp.clear();
  int h = n - 1, i = m - 1;
  long long kk = 0;
  while (i >= 0) {
    while (h >= 0 && b[h].x >= a[i].x)
      hp.push_back(b[h]), push_heap(hp.begin(), hp.end(), cmp1), h--;
    if (!hp.size()) return false;
    kk += hp.front().y;
    for (int j = max(0, i - dd + 1); j <= i; j++)
      asn[a[j].y - 1] = hp.front().z;
    pop_heap(hp.begin(), hp.end(), cmp1);
    hp.pop_back();
    i -= dd;
  }
  if (kk <= k)
    return true;
  else
    return false;
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 0; i < m; i++) scanf("%d", &a[i].x), a[i].y = i + 1;
  sort(a, a + m, cmp);
  for (int i = 0; i < n; i++) scanf("%d", &b[i].x), b[i].z = i + 1;
  for (int i = 0; i < n; i++) scanf("%d", &b[i].y);
  sort(b, b + n, cmp);
  int t1 = 0, t2 = m;
  while (t1 < t2) {
    int t = (t1 * 1ll + t2) / 2;
    if (doit(t))
      t2 = t;
    else
      t1 = t + 1;
  }
  if (doit(t1)) {
    printf("YES\n");
    for (int i = 0; i < m; i++) printf("%d ", asn[i]);
  } else
    printf("NO");
  return 0;
}
