Palo Alto is an unusual city because it is an endless coordinate line. It is also known for the office of Lyft Level 5.

Lyft has become so popular so that it is now used by all m taxi drivers in the city, who every day transport the rest of the city residents — n riders.

Each resident (including taxi drivers) of Palo-Alto lives in its unique location (there is no such pair of residents that their coordinates are the same).

The Lyft system is very clever: when a rider calls a taxi, his call does not go to all taxi drivers, but only to the one that is the closest to that person. If there are multiple ones with the same distance, then to taxi driver with a smaller coordinate is selected.

But one morning the taxi drivers wondered: how many riders are there that would call the given taxi driver if they were the first to order a taxi on that day? In other words, you need to find for each taxi driver i the number a_{i} — the number of riders that would call the i-th taxi driver when all drivers and riders are at their home?

The taxi driver can neither transport himself nor other taxi drivers.

Input

The first line contains two integers n and m (1 ≤ n,m ≤ 10^5) — number of riders and taxi drivers.

The second line contains n + m integers x_1, x_2, …, x_{n+m} (1 ≤ x_1 < x_2 < … < x_{n+m} ≤ 10^9), where x_i is the coordinate where the i-th resident lives. 

The third line contains n + m integers t_1, t_2, …, t_{n+m} (0 ≤ t_i ≤ 1). If t_i = 1, then the i-th resident is a taxi driver, otherwise t_i = 0.

It is guaranteed that the number of i such that t_i = 1 is equal to m.

Output

Print m integers a_1, a_2, …, a_{m}, where a_i is the answer for the i-th taxi driver. The taxi driver has the number i if among all the taxi drivers he lives in the i-th smallest coordinate (see examples for better understanding).

Examples

Input

3 1
1 2 3 10
0 0 1 0


Output

3 

Input

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


Output

2 1 

Input

1 4
2 4 6 10 15
1 1 1 1 0


Output

0 0 0 1 

Note

In the first example, we have only one taxi driver, which means an order from any of n riders will go to him.

In the second example, the first taxi driver lives at the point with the coordinate 2, and the second one lives at the point with the coordinate 6. Obviously, the nearest taxi driver to the rider who lives on the 3 coordinate is the first one, and to the rider who lives on the coordinate 5 is the second one. The rider who lives on the 4 coordinate has the same distance to the first and the second taxi drivers, but since the first taxi driver has a smaller coordinate, the call from this rider will go to the first taxi driver.

In the third example, we have one rider and the taxi driver nearest to him is the fourth one.

import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.InputMismatchException;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Timer;


public final class Main {
	static long mod = 1000000007;
	static int block = 320;

	static long fibMods[] = new long[100006];
	static Map<Long,Integer> mp = new HashMap<>();

	public static void calculateFibs() {

		fibMods[1] = 1;
		fibMods[2] = 1;
		for (int i = 3; i < 100005; i++) {
			fibMods[i] = (fibMods[i - 1] + fibMods[i - 2]) % mod;
		}
	}

	public static void main(String[] args) throws Exception {

		InputReader in = new InputReader(System.in);
		PrintWriter pw = new PrintWriter(System.out);
		
		int ar[] = new int[1000006];
		
		int tc = 1;
		while( tc-->0 ){
			
			int n = in.readInt();
			int m = in.readInt();
			
			Map<Integer,Integer> map = new HashMap<>();

			int drivers[] = new int[100005];
			
			
			for( int i=0 ; i<n+m ; i++ ){
				ar[i] = in.readInt();
			}
			int index = 0;
			
			for( int i=0 ; i<n+m ; i++ ){
				int driver = in.readInt();
				map.put(ar[i], driver );
				if( driver == 1 )
					drivers[index++] = ar[i];
			}
			int result[] = new int[index];
			for( int i=0 ; i<n+m ; i++ ){
				if( map.get(ar[i]) == 0 ){
					int index_driver = lowerBound(drivers, index, ar[i]);
					if( index_driver >= index ){
						result[index-1]++;
					}
					if( index_driver < index ){
						if( index_driver>0 && Math.abs(drivers[index_driver-1] - ar[i]) <= Math.abs( drivers[index_driver] - ar[i] ) ){
							result[index_driver-1]++;
						}
						else 
							result[index_driver]++;
					}
					
				}
			}
			for( int i=0 ; i<index ; i++ ){
				pw.print(result[i]+" ");
			}
			
		}

		pw.close();

	}

	private static long CalculateNoOfSwaps(long[] cr, long[] br, int n, long temp) {
		
		//long cr[] = new long[100005];
		//for(int i=1;i<=n;i++)cr[i] = ar[i];
		
		Set<Long> sless = new HashSet<>();  // less value to be replaced with big value
		Set<Long> sbigs = new HashSet<>();  //big value to be replaced wth less value
		Set<Long> corr = new HashSet<>();
		int pos = mp.get(temp);
		int low, high, mid;
		int noofminstoswap = 0 , noofmaxtoswap = 0;
	    int index = Arrays.binarySearch(br, 1, n+1, temp);
		
	    low = 1;
	    high = n;
	    while(low <= high){
	    	mid = (low + high) / 2;
	    	
	    	//System.out.println("low = "+ low + " and high = " + high + "mid is " + mid + " and cr[mid] is " + cr[mid]);
	        
	        if( cr[mid] == temp )
	            break;
	        else if( pos < mid && cr[mid] < temp ){  // temp is at pos left so mid should not be less than temp swap mid with max
	            high = mid - 1;
	            //System.out.println("pos is " + pos + " mid is " + mid + " ar[mid] is " + cr[mid] + " mid need a maximum");	            
	            //noofmaxtoswap++;
	            sless.add(cr[mid]);
	            
	        }
	        else if( pos < mid && cr[mid] > temp ){ // no swapping required
	        	high = mid -1;
	        	corr.add(cr[mid]);
	        	noofmaxtoswap++;
	        }
	        else if( pos > mid && cr[mid] > temp ){ // temp is on right so mid should be less, but it is big so swap with min
	        	low = mid + 1;
	        	//System.out.println("pos is " + pos + " mid is " + mid + " ar[mid] is " + cr[mid] + " mid need a minimum");
	        	sbigs.add(cr[mid]);
	        }
	        else if( pos > mid && cr[mid] < temp ){
	        	low = mid + 1;
	        	corr.add(cr[mid]);
	        	noofminstoswap++;
	        }
	          
	    }
	    //System.out.println(Arrays.toString(sless.toArray()));
	    //System.out.println(Arrays.toString(sbigs.toArray()));
	    int mins = min(sless.size(), sbigs.size());
	    int count = mins;
	    //System.out.println("aata");
	    if( sless.size() > sbigs.size() ){
	    	Iterator<Long> it = sless.iterator();
	    	int temps = sless.size() - sbigs.size();
	    	for( int i = 0 ; i< temps; i++){
	    		it.next();
	    		it.remove();
	    	}
	    }
	    else{	    	
	    	Iterator<Long> it = sbigs.iterator();
	    	int temps = sbigs.size() - sless.size();
	    	for( int i = 0 ; i<temps  ; i++){
	    		it.next();
	    		it.remove();
	    		//System.out.println("after rem" + Arrays.toString(sbigs.toArray()));
	    	}
	    }
	    noofmaxtoswap += mins ; noofminstoswap += mins;
	    
	    low = 1;
	    high = n;
	    //System.out.println(Arrays.toString(sless.toArray()));
	    //System.out.println(Arrays.toString(sbigs.toArray()));
	    
	    while(low <= high){
	    	mid = (low + high) / 2;
	    	
	    	//System.out.println("low = "+ low + " and high = " + high + "mid is " + mid + " and cr[mid] is " + cr[mid]);
	        
	        if( cr[mid] == temp )
	            break;
	        else if( pos < mid && cr[mid] < temp ){  // temp is at pos left so mid should not be less than temp swap mid with max
	            high = mid - 1;
	            //System.out.println("pos is " + pos + " mid is " + mid + " ar[mid] is " + cr[mid] + " mid need a maximum");
	            if(!sless.contains(cr[mid]) ){
	            	//System.out.println("needs swapping now");
		            noofmaxtoswap++;
		            count++;
		            if( noofmaxtoswap > (n-index) )break;
//		            else{
//		            	int maxIndex = n+1-noofmaxtoswap;
//		            	long maxValue = br[maxIndex];
//		            	System.out.println("swapping " + cr[mid] + " and " + maxValue);
//		            	int maxIndexActualIndex = mp.get(maxValue);
//		            	cr[maxIndexActualIndex] = cr[mid];
//		            	cr[mid] = maxValue;
//		            	System.out.println("swapped now");
//		            	
//		            }
	            }
	        }
	        else if( pos < mid && cr[mid] > temp ){ // no swapping required
	        	high = mid -1;
	        }
	        else if( pos > mid && cr[mid] > temp  ){ // temp is on right so mid should be less, but it is big so swap with min
	        	low = mid + 1;
	        	//System.out.println("pos is " + pos + " mid is " + mid + " ar[mid] is " + cr[mid] + " mid need a minimum");
	        	if(!sbigs.contains(cr[mid])){
	        		//System.out.println("needs swapping now");
		        	noofminstoswap++;
		        	count++;
		        	if( noofminstoswap >= (index) )break;
//		        	else{
//		        		
//		        		int minIndex = noofminstoswap;
//		            	long minValue = br[minIndex];
//		            	int minIndexActualIndex = mp.get(minValue);
//		            	System.out.println("swapping " + cr[mid] + " and " + minValue);
//		            	cr[minIndexActualIndex] = cr[mid];
//		            	cr[mid] = minValue;
//		            	
//		            	
//		        	}
	        	}
	        }
	        else if( pos > mid && cr[mid] < temp ){
	        	low = mid + 1;
	        }
	          
	    }
	    
	    if(noofmaxtoswap <= (n-index) && noofminstoswap < (index)){
	    	return count;
	    }
		
		
		return -1;
	}

	private static boolean isPowerOf2(long number) {
		return (number > 0) && ((number & (number - 1)) == 0);
	}

	public static long fib(long n, long a, long b, long c, long d) {
		long f[][] = { { 1, 1 }, { 1, 0 } };
		long g[][] = { { a, b }, { c, d } };

		if (n == 0)
			return 0;
		if (n == 1)
			return b;
		if (n == 2)
			return a;
		power(f, n - 2, a, b, c, d);
		multiply(f, g);

		return f[0][0] % mod;

	}

	public static void multiply(long f[][], long g[][]) {
		long a = ((f[0][0] * g[0][0]) % mod + (f[0][1] * g[1][0]) % mod) % mod;
		long b = ((f[0][0] * g[0][1]) % mod + (f[0][1] * g[1][1]) % mod) % mod;
		long c = ((f[1][0] * g[0][0]) % mod + (f[1][1] * g[1][0]) % mod) % mod;
		long d = ((f[1][0] * g[0][1]) % mod + (f[1][1] * g[1][1]) % mod) % mod;

		f[0][0] = a;
		f[0][1] = b;
		f[1][0] = c;
		f[1][1] = d;

	}

	public static void power(long f[][], long n, long a, long b, long c, long d) {

		long g[][] = new long[2][2];
		g[0][0] = f[0][0];
		g[1][0] = f[1][0];
		g[0][1] = f[0][1];
		g[1][1] = f[1][1];

		if (n == 0 || n == 1)
			return;

		power(f, n / 2, a, b, c, d);
		multiply(f, f);

		if (n % 2 == 1)
			multiply(f, g);

	}

	// If m is prime, then directly calculate the modulo inverse using the
	// following formula:
	// power(a, m-2, m)
	//
	// But if m is not guaranteed to be prime, however a , m are coprime use
	// extended Euclid theoram as below
	//
	// Returns modulo inverse of a with
	// respect to m using extended Euclid
	// Algorithm Assumption: a and m are
	// coprimes, i.e., gcd(a, m) = 1
	static int mul_inv(int a, int b) {

		int b0 = b, t, q;
		int x0 = 0, x1 = 1;
		if (b == 1)
			return 0;
		while (a > 1) {

			q = a / b;
			t = b;
			b = a % b;
			a = t;
			t = x0;
			x0 = x1 - q * x0;
			x1 = t;

		}
		if (x1 < 0)
			x1 += b0;
		return x1;
	}

	public static long gcd(long x, long y) {
		if (x % y == 0)
			return y;
		else
			return gcd(y, x % y);
	}

	public static int gcd(int x, int y) {
		if (x % y == 0)
			return y;
		else
			return gcd(y, x % y);
	}

	public static int abs(int a, int b) {
		return (int) Math.abs(a - b);
	}

	public static long abs(long a, long b) {
		return (long) Math.abs(a - b);
	}

	public static int max(int a, int b) {
		if (a > b)
			return a;
		else
			return b;
	}

	public static int min(int a, int b) {
		if (a > b)
			return b;
		else
			return a;
	}

	public static long max(long a, long b) {
		if (a > b)
			return a;
		else
			return b;
	}

	public static long min(long a, long b) {
		if (a > b)
			return b;
		else
			return a;
	}

	public static long mulmod(long a, long b, long mod) throws Exception {
		if (a == 0 || b == 0)
			return 0;
		if (b == 1)
			return a;
		long ans = mulmod(a, b / 2, mod);
		ans = (ans * 2) % mod;
		if (b % 2 == 1)
			ans = (a + ans) % mod;
		return ans;
	}

	// sieve
	public static int[] primes(int n) throws Exception { // for(int
															// i=1;i<=arr.length-1;i++)out.write(""+arr[i]+"
															// ");
		boolean arr[] = new boolean[n + 1];
		Arrays.fill(arr, true);
		for (int i = 1; i <= Math.sqrt(n); i++) {
			if (!arr[i])
				continue;
			for (int j = 2 * i; j <= n; j += i) {
				arr[i] = false;
			}
		}
		LinkedList<Integer> ll = new LinkedList<Integer>();
		for (int i = 1; i <= n; i++) {
			if (arr[i])
				ll.add(i);
		}
		n = ll.size();

		int primes[] = new int[n + 1];
		for (int i = 1; i <= n; i++) {
			primes[i] = ll.removeFirst();
		}
		return primes;
	}

	public static long pow(long n, long p, long m) {
		long result = 1;
		if (p == 0)
			return 1;
		if (p == 1)
			return n;
		while (p != 0) {
			if (p % 2 == 1)
				result *= n;
			if (result >= m)
				result %= m;
			p >>= 1;
			n *= n;
			if (n >= m)
				n %= m;
		}
		return result;
	}

	/*
	 * -If searched element doesn't exist function returns index of first
	 * element which is bigger than searched value.<br> -If searched element is
	 * bigger than any array element function returns first index after last
	 * element.<br> -If searched element is lower than any array element
	 * function returns index of first element.<br> -If there are many values
	 * equals searched value function returns first occurrence.<br>
	 */
	public static int lowerBound(int[] array, int length, int value) {
		int low = 0;
		int high = length;
		while (low < high) {
			final int mid = (low + high) / 2;
			if (value <= array[mid]) {
				high = mid;
			} else {
				low = mid + 1;
			}
		}
		return low;
	}

	/*
	 * Returns index of the first element which is grater than searched value.
	 * If searched element is bigger than any array element function returns
	 * first index after last element
	 */
	public static int upperBound(int[] array, int length, int value) {
		int low = 0;
		int high = length;
		while (low < high) {
			final int mid = (low + high) / 2;
			if (value >= array[mid]) {
				low = mid + 1;
			} else {
				high = mid;
			}
		}
		return low;
	}

	public static long pow(long n, long p) {
		long result = 1;
		if (p == 0)
			return 1;
		if (p == 1)
			return n;
		while (p != 0) {
			if (p % 2 == 1)
				result *= n;
			p >>= 1;
			n *= n;
		}
		return result;

	}

	static class Pair implements Comparable<Pair> {
		int a, b, c;

		Pair(int a, int b, int c) {
			this.a = a;
			this.b = b;
			this.c = c;
		}

		public int compareTo(Pair o) {
			// TODO Auto-generated method stub
			if (this.a / block != o.a / block)
				return Integer.compare(this.a / block, o.a / block);
			else if (this.b != o.b)
				return Integer.compare(this.b, o.b);
			else
				return Integer.compare(this.c, o.c);
			// return 0;
		}

		public boolean equals(Object o) {
			if (o instanceof Pair) {
				Pair p = (Pair) o;
				return p.a == a && p.b == b && p.c == c;
			}
			return false;
		}

		public int hashCode() {
			return new Integer(a).hashCode() * 31 + new Integer(b).hashCode() + new Integer(c).hashCode() * 37;
		}

	}

	static long sort(int a[]) {
		int n = a.length;
		int b[] = new int[n];
		return mergeSort(a, b, 0, n - 1);
	}

	static long mergeSort(int a[], int b[], long left, long right) {
		long c = 0;
		if (left < right) {
			long mid = left + (right - left) / 2;
			c = mergeSort(a, b, left, mid);
			c += mergeSort(a, b, mid + 1, right);
			c += merge(a, b, left, mid + 1, right);
		}
		return c;
	}

	static long merge(int a[], int b[], long left, long mid, long right) {
		long c = 0;
		int i = (int) left;
		int j = (int) mid;
		int k = (int) left;
		while (i <= (int) mid - 1 && j <= (int) right) {
			if (a[i] <= a[j]) {
				b[k++] = a[i++];
			} else {
				b[k++] = a[j++];
				c += mid - i;
			}
		}
		while (i <= (int) mid - 1)
			b[k++] = a[i++];
		while (j <= (int) right)
			b[k++] = a[j++];
		for (i = (int) left; i <= (int) right; i++)
			a[i] = b[i];
		return c;
	}

	static class InputReader {
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;
		private SpaceCharFilter filter;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		public int read() {
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public int readInt() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public String readString() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public String readLine() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isEndOfLine(c));
			return res.toString();
		}

		public double readDouble() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			double res = 0;
			while (!isSpaceChar(c) && c != '.') {
				if (c == 'e' || c == 'E')
					return res * Math.pow(10, readInt());
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			}
			if (c == '.') {
				c = read();
				double m = 1;
				while (!isSpaceChar(c)) {
					if (c == 'e' || c == 'E')
						return res * Math.pow(10, readInt());
					if (c < '0' || c > '9')
						throw new InputMismatchException();
					m /= 10;
					res += (c - '0') * m;
					c = read();
				}
			}
			return res * sgn;
		}

		public long readLong() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public boolean isSpaceChar(int c) {
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public String next() {
			return readString();
		}

		public interface SpaceCharFilter {
			public boolean isSpaceChar(int ch);
		}

		public boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}
	}

}
