You have an integer array A=\[a_0,a_1,…,a_2m−1] of length 2m. Initially, the array consists of zeros.
You also have an integer variable x. Initially, x=0.
For each i=1,2,…,n, you are given two integers p_i and q_i, and you have to perform the following steps:
Find the value of xmod230 at the end of this process.
The first line contains two integers n and m (1≤n≤500,000; 1≤m≤30).
The i-th of the following n lines contains two integers p_i and q_i (0≤p_i,q_i<2m).
Print the value of xmod230.
In the example test, initially, A=\[0,0,0,0] and x=0. Then: