Problem: Soon there will be held the world's largest programming contest, but the testing system still has m bugs. The contest organizer, a well-known university, has no choice but to attract university students to fix all the bugs. The university has n students able to perform such work. The students realize that they are the only hope of the organizers, so they don't want to work for free: the i-th student wants to get ci 'passes' in his subjects (regardless of the volume of his work).

Bugs, like students, are not the same: every bug is characterized by complexity aj, and every student has the level of his abilities bi. Student i can fix a bug j only if the level of his abilities is not less than the complexity of the bug: bi ≥ aj, and he does it in one day. Otherwise, the bug will have to be fixed by another student. Of course, no student can work on a few bugs in one day. All bugs are not dependent on each other, so they can be corrected in any order, and different students can work simultaneously.

The university wants to fix all the bugs as quickly as possible, but giving the students the total of not more than s passes. Determine which students to use for that and come up with the schedule of work saying which student should fix which bug.

Input

The first line contains three space-separated integers: n, m and s (1 ≤ n, m ≤ 105, 0 ≤ s ≤ 109) — the number of students, the number of bugs in the system and the maximum number of passes the university is ready to give the students.

The next line contains m space-separated integers a1, a2, ..., am (1 ≤ ai ≤ 109) — the bugs' complexities.

The next line contains n space-separated integers b1, b2, ..., bn (1 ≤ bi ≤ 109) — the levels of the students' abilities.

The next line contains n space-separated integers c1, c2, ..., cn (0 ≤ ci ≤ 109) — the numbers of the passes the students want to get for their help.

Output

If the university can't correct all bugs print "NO".

Otherwise, on the first line print "YES", and on the next line print m space-separated integers: the i-th of these numbers should equal the number of the student who corrects the i-th bug in the optimal answer. The bugs should be corrected as quickly as possible (you must spend the minimum number of days), and the total given passes mustn't exceed s. If there are multiple optimal answers, you can output any of them.

Examples

Input

3 4 9
1 3 1 2
2 1 3
4 3 6


Output

YES
2 3 2 3


Input

3 4 10
2 3 1 2
2 1 3
4 3 6


Output

YES
1 3 1 3


Input

3 4 9
2 3 1 2
2 1 3
4 3 6


Output

YES
3 3 2 3


Input

3 4 5
1 3 1 2
2 1 3
5 3 6


Output

NO

Note

Consider the first sample.

The third student (with level 3) must fix the 2nd and 4th bugs (complexities 3 and 2 correspondingly) and the second student (with level 1) must fix the 1st and 3rd bugs (their complexity also equals 1). Fixing each bug takes one day for each student, so it takes 2 days to fix all bugs (the students can work in parallel).

The second student wants 3 passes for his assistance, the third student wants 6 passes. It meets the university's capabilities as it is ready to give at most 9 passes.

Solution (in JAVA):

Solution:
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Random;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;
 	
 
public class Main {
	static PrintWriter pr = new PrintWriter(System.out);
	static int n,m,s;
	static int a[];
	static int b[];
	static int c[];
	
	static Edge[] edges;
	static Edge1[] edges1;
	static int missions[];
	static boolean found;
	
	static boolean check(int t) {
		PriorityQueue<Edge2> pq = new PriorityQueue<Edge2>();
		long total=0;
		int index=0;
		for(int i=0; i<m; i+=t) {
			for(;index<n; index++) {
				if(edges[index].u>=edges1[i].u) {
					pq.add(new Edge2(edges[index].v,edges[index].index));
				}else
					break;
			}
			if(pq.isEmpty())
				return false;
			Edge2 ed = pq.remove();
			total+=ed.u;
			for(int j=i; j<i+t;j++) {
				if(j>=m)
					break;
				missions[edges1[j].index] = ed.index;
			}
		}
		return total<=s;
	}
	
	public static void main(String args[]) throws IOException{
		//FileReader in = new FileReader("C:/test.txt");
		
		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
		Scanner sc = new Scanner(System.in);
		
		n = sc.nextInt();
		m = sc.nextInt();
		s = sc.nextInt();
		
		a = new int[m];
		b = new int[n];
		c = new int[n];
		missions = new int[m];
		
		for(int i=0; i<m; i++)
			a[i] = sc.nextInt();
		for(int i=0; i<n; i++)
			b[i] = sc.nextInt();
		for(int i=0; i<n; i++)
			c[i] = sc.nextInt();
		
		edges = new Edge[n];
		for(int i=0; i<n; i++) {
			edges[i] = new Edge(b[i],c[i],i);
		}
		Arrays.sort(edges);
		
		edges1 = new Edge1[m];
		for(int i=0; i<m; i++) {
			edges1[i] = new Edge1(a[i],i);
		}
		Arrays.sort(edges1);
		
		int high = (int)1e5;
		int low = 0;
		found = false;
		int ans = 0;
		while(high>=low) {
			int mid = (high+low)>>1;
			boolean z = check(mid);
			if(z) {
				found = true;
				ans = mid;
				high = mid-1;
			}else
				low = mid+1;
		}
		
		/*pr.println(check(2));
		for(int i=0; i<n; i++)
			pr.printf("%s %s %s\n", edges[i].u,edges[i].v, edges[i].index);
		pr.println();
		for(int i=0; i<m; i++)
			pr.printf("%s %s\n", edges1[i].u, edges1[i].index);*/
		
		
		if(!found) {
			pr.println("NO");
		}else {
			pr.println("YES");
			boolean z = check(ans);
			//pr.println(ans);
			for(int i=0; i<m; i++)
				pr.printf("%s ", missions[i]+1);
			pr.println();
				
		}
		
		pr.flush();
		pr.close();
	}
	
	
	
	
	
	static class Edge implements Comparable<Edge>
	{
		int u,v,index;
		public Edge(int a, int b, int c) { u = a;v = b; index = c;}
		@Override
		public int compareTo(Edge e) {
			return e.u-u;
		}
		
	}
	
	static class Edge1 implements Comparable<Edge1>{
		int u,index;
		public Edge1(int a, int b) { u = a;index=b;}
		public int compareTo(Edge1 e) {
			return e.u-u;
		}
	}
	
	static class Edge2 implements Comparable<Edge2>{
		int u,index;
		public Edge2(int a, int b) { u = a;index=b;}
		public int compareTo(Edge2 e) {
			return u-e.u;
		}
	}



	
	static class UnionFind {                                              
		int[] p, rank;

		UnionFind(int N) 
		{
			p = new int[N];
			rank = new int[N];
			for (int i = 0; i < N; i++) 
				p[i] = i;
		}

		int findSet(int x) { return p[x] == x ? x : (p[x] = findSet(p[x])); }

		boolean union(int x, int y) 
		{ 
			x = findSet(x);
			y = findSet(y);
			if(x == y)
				return false;

			if (rank[x] > rank[y]) 
				p[y] = x;
			else
			{	
				p[x] = y;
				if(rank[x] == rank[y])
					++rank[y]; 
			} 
			return true;
		}
	}
	
	
	public class pair implements Comparable<pair>{
		int a;
		int b;
		int c;
		public pair(int a, int b) {
			this.a = a;
			this.b = b;
			
		}
		public int compareTo(pair o) {
			if(a!=o.a)
				return a-o.a;
			else 
				return b-o.b;
			
		}
 
	}
	
	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public Scanner(String f) throws FileNotFoundException {
			br = new BufferedReader(new FileReader(f));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

		public int[] nextIntArray(int n) throws IOException {
			int[] a = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

		public int[] nextIntArray1(int n) throws IOException {
			int[] a = new int[n + 1];
			for (int i = 1; i <= n; i++)
				a[i] = nextInt();
			return a;
		}

		public int[] shuffle(int[] a, int n) {
			int[] b = new int[n];
			for (int i = 0; i < n; i++)
				b[i] = a[i];
			Random r = new Random();
			for (int i = 0; i < n; i++) {
				int j = i + r.nextInt(n - i);
				int t = b[i];
				b[i] = b[j];
				b[j] = t;
			}
			return b;
		}

		public int[] nextIntArraySorted(int n) throws IOException {
			int[] a = nextIntArray(n);
			a = shuffle(a, n);
			Arrays.sort(a);
			return a;
		}

		public long[] nextLongArray(int n) throws IOException {
			long[] a = new long[n];
			for (int i = 0; i < n; i++)
				a[i] = nextLong();
			return a;
		}

		public long[] nextLongArray1(int n) throws IOException {
			long[] a = new long[n + 1];
			for (int i = 1; i <= n; i++)
				a[i] = nextLong();
			return a;
		}

		public long[] nextLongArraySorted(int n) throws IOException {
			long[] a = nextLongArray(n);
			Random r = new Random();
			for (int i = 0; i < n; i++) {
				int j = i + r.nextInt(n - i);
				long t = a[i];
				a[i] = a[j];
				a[j] = t;
			}
			Arrays.sort(a);
			return a;
		}
	}
	
	
	
	//
}