Which Chunk Holds Byte X?
An object store keeps a large file as n consecutive chunks, numbered 1 to n. Chunk i holds s_i bytes, and some chunks may be empty (s_i = 0). Byte offsets in the file are 0-based: chunk 1 holds the first s_1 bytes, chunk 2 the next s_2 bytes, and so on.
You receive q read requests, each asking for the byte at global offset x. For each request, report the chunk that holds this byte and the byte's 0-based offset inside that chunk. An empty chunk holds no bytes, so it is never the answer. If x is at or past the end of the file, the byte doesn't exist.
Input
The first line contains two integers n and q (1 ≤ n ≤ 2·10^5, 1 ≤ q ≤ 2·10^5).
The second line contains n integers s_1, s_2, …, s_n (0 ≤ s_i ≤ 10^9), the chunk sizes in bytes.
Each of the next q lines contains one integer x (0 ≤ x ≤ 10^15), the requested global offset.
The file can be far larger than 2^32 bytes, so offsets and running totals need 64-bit integers.
Output
For each request, in input order, print one line. If the byte exists, print two integers: the chunk index i (1-based) and the offset k inside chunk i (0 ≤ k < s_i). Otherwise print OUT OF RANGE.
Notes
In the first example the chunk sizes are 4, 0, 3, 5, so chunk 1 holds bytes 0–3, chunk 2 holds nothing, chunk 3 holds bytes 4–6 and chunk 4 holds bytes 7–11. Byte 4 is the first byte of chunk 3, not of the empty chunk 2. The file has 12 bytes, so offset 12 is out of range.
In the second example the file is 5 000 000 000 bytes long, more than 2^32.