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.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.*;
import java.io.*;
import java.math.*;
public class Main
{
	static class Sort implements Comparable<Sort>
	{
		long c;
		long value;
		Sort(long x,long v)
		{
			c=x;
			value=v;
		}
		public int compareTo(Sort obj)
		{
			if(value<obj.value)
			{
				return -1;
			}
			else
			{
				return 1;
			}
		}
	}

    public static long pow(long a, long b)
    {
        long result=1;
        while(b>0)
        {
            if (b % 2 != 0)
            {
                result=(result*a);
                b--;
            } 
            a=(a*a);
            b /= 2;
        }   
                return result;
    }
    public static BigInteger fact(long num)
    {
                BigInteger fact=new BigInteger("1");
                int i=0;
                for(i=1; i<=num; i++)
                {
                    BigInteger bg=BigInteger.valueOf(i);
                    fact=fact.multiply(bg);
                }
                return fact;
            }
            public static long gcd(long a, long b)
            {
                if (a == 0)
                    return b;
                return gcd(b%a, a);
            }
            
            public static long lcm(int a,int b)
            {
                return a * (b / gcd(a, b));
            }
            public static long sum(int h)
            {
                return (h*(h+1)/2);
            }
		/*	public static void dfs(int parent,boolean[] visited)
			{
				ArrayList<Integer> arr=new ArrayList<Integer>();
				arr=graph.get(parent);
				visited[parent]=true;
				for(int i=0;i<arr.size();i++)
				{
					int num=arr.get(i);
					if(visited[num]==false)
					{
						count++;
						ans=Math.max(count,ans);
						dfs(num,visited);
					}
				}
			}
			static int[] storing2;*/
	/*		static int[] storing1;
			static int count=0;
			public static void bfs(int parent, boolean[] visited)
			{
				LinkedList<Integer> q=new LinkedList<>();
				visited[parent]=true;
				q.add(parent);
				while(!q.isEmpty())
				{
					int num=q.poll();
				//	System.out.print(num+" ");
					ArrayList<Integer> ar=graph.get(num);
				//	System.out.print(ar.toString()+" ");
					for(int i=0;i<ar.size();i++)
					{
						int num1=ar.get(i);
					//	System.out.print(num1+" ");
						if(visited[num1]==false)
						{
							storing1[num1]=storing1[num]+1;
							visited[num1]=true;
							q.add(num1);
						}
					}
				}
			}
			static ArrayList<ArrayList<Integer>> graph;*/
			public static void main(String args[])throws IOException
            {	
                //InputReader in=new InputReader(System.in);
        		//OutputWriter out=new OutputWriter(System.out);
				long mod=1000000007;
        	//    BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        	    ArrayList<Integer> ar=new ArrayList<>();
				ArrayList<Long> index1=new ArrayList<>();
				TreeSet<Long> ts=new TreeSet<>();
				TreeSet<Integer> ts1=new TreeSet<>();
				HashMap<Long,Integer> hash=new HashMap<>();
				int n=i();
				int m=i();
				long[] a=new long[n+m];
				long[] b=new long[n+m];
				for(int i=0;i<n+m;i++)
				{
					a[i]=l();
				}
				for(int i=0;i<n+m;i++)
				{
					b[i]=i();
				}
				Sort[] arr=new Sort[n+m];
				for(int i=0;i<n+m;i++)
				{
					arr[i]=new Sort(b[i],a[i]);
				}
				Arrays.sort(arr);
			/*	for(int i=0;i<n+m;i++)
				{
					a[i]=arr[i].value;
					b[i]=arr[i].c;
				//	pln(a[i]+" "+b[i]);
				//	pln(a[i]+" "+b[i]);
				}
				*/
				for(int i=0;i<n+m;i++)
				{
					if(b[i]==1)
					{
						ts.add(a[i]);
						hash.put(a[i],0);
					}
				}
				long[] count=new long[n+m];
				for(int i=0;i<n+m;i++)
				{
					if(b[i]==0)
					{
						Long num=ts.lower(a[i]);
						Long num2=ts.higher(a[i]);
						//System.out.println(num+" "+num2);
						if(num==null)
						{
							if(hash.containsKey(num2))
							{
								hash.put(num2,hash.get(num2)+1);
							}
							else
								hash.put(num2,1);
						}
						else if(num2==null)
						{
							if(hash.containsKey(num))
							{
								hash.put(num,hash.get(num)+1);
							}
							else
								hash.put(num,1);
						}
						else
						{
							long diff=Math.abs(num-a[i]);
							long diff1=Math.abs(num2-a[i]);
							if(diff<=diff1)
							{
								if(hash.containsKey(num))
								{
									hash.put(num,hash.get(num)+1);
								}
							else
								hash.put(num,1);
							}
							else if(diff>diff1)
							{
								if(hash.containsKey(num2))
							{
								hash.put(num2,hash.get(num2)+1);
							}
							else
								hash.put(num2,1);
						
							}
						}
					}
				}
				for(int i=0;i<n+m;i++)
				{
					if(b[i]==1)
					{
						System.out.print(hash.get(a[i])+" ");
					}
				}
				pln("");
			}
			
			
			
			/**/
			static InputReader in=new InputReader(System.in);
                static OutputWriter out=new OutputWriter(System.out);
                public static long l()
				
                {
                    String s=in.String();
                    return Long.parseLong(s);
                }
                public static void pln(String value)
                {
                    System.out.println(value);
                }
                public static int i()
                {
                    return in.Int();
                }
                public static String s()
                {
                    return in.String();
                }
	}
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
        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 Int() {
        		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 String() {
        		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 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 String();
        	}
         
        	public interface SpaceCharFilter {
        		public boolean isSpaceChar(int ch);
        	}
        }
         
        class OutputWriter {
        	private final PrintWriter writer;
         
        	public OutputWriter(OutputStream outputStream) {
        		writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        	}
         
        	public OutputWriter(Writer writer) {
        		this.writer = new PrintWriter(writer);
        	}
         
        	public void print(Object...objects) {
        		for (int i = 0; i < objects.length; i++) {
        			if (i != 0)
        				writer.print(' ');
        			writer.print(objects[i]);
        		}
        	}
         
        	public void printLine(Object...objects) {
        		print(objects);
        		writer.println();
        	}
         
        	public void close() {
        		writer.close();
        	}
         
        	public void flush() {
        		writer.flush();
        	}
         
        	}
         
            class IOUtils {
         
        	public static int[] readIntArray(InputReader in, int size) {
        		int[] array = new int[size];
        		for (int i = 0; i < size; i++)
        			array[i] = in.Int();
        		return array;
        	}
         
        	} 