#include <bits/stdc++.h>   using namespace std;   int n, m, s;   pair<int, int> A[200000];   pair<pair<int, int>, int> B[200000];   set<pair<pair<int, int>, int> > candidates;   pair<int, int> q[200000];   int sp, st;   int answer[200000];   bool check(int days) {     int j = n - 1;     sp = st = 0;     int used = 0;     candidates.clear();     for (int i = m - 1; i >= 0; --i) {       while (j >= 0 && B[j].first.first >= A[i].first) {         candidates.insert(make_pair(             make_pair(B[j].first.second, B[j].first.first), B[j].second));         --j;       }       if (st < sp) {         answer[A[i].second] = q[st].second + 1;         --q[st].first;         if (q[st].first == 0) ++st;       } else {         if (candidates.size() == 0) return false;         pair<pair<int, int>, int> best = *candidates.begin();         candidates.erase(candidates.begin());         used += best.first.first;         if (used > s) return false;         answer[A[i].second] = best.second + 1;         if (days > 1) q[sp++] = make_pair(days - 1, best.second);       }     }     return true;   }   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 , &B[i].first.first);       B[i].second = i;     }     for (int i = 0; i < n; ++i) scanf( %d , &B[i].first.second);     sort(A, A + m);     sort(B, B + n);     int left = 1, right = m;     while (left < right) {       int middle = (left + right) / 2;       if (check(middle))         right = middle;       else         left = middle + 1;     }     if (check(left)) {       printf( YES n%d , answer[0]);       for (int i = 1; i < m; ++i) printf(  %d , answer[i]);       printf(  n );     } else {       printf( NO n );     }     return 0;   }   