Miner

아직 제출이 없습니다시간 제한1초메모리 제한256 MB

문제

There are nn different minerals in a mine cave. The mine cave can be regarded as a coordinate axis, and the ii-th mineral can be mined from any position in range \[l_i,r_i]\[l\_i, r\_i].

You are a miner in this mine cave. On each day, the foreman gives you a task of mining minerals. A task is a non-empty set of different minerals (there are 2n12^n - 1 different tasks), and your goal is to collect all minerals in this set.

There are mm safe positions a_ia\_i in the mine cave. A task is easy if and only if you can select a safe position a_pa\_p and find all required minerals there.

Now, you want to count the number of easy tasks.

입력

The first line contains two integers nn and mm (1n,m1051 \le n, m \le 10^5).

Then nn lines follow. Each of them contains two integers l_il\_i and r_ir\_i (1l_ir_i1091 \le l\_i \le r\_i \le 10^9).

Then mm lines follow. Each of them contains a single integer a_ia\_i (1a_i1091 \le a\_i \le 10^9).

출력

Output a single line with a single integer: the number of easy tasks modulo 998,244,353998\\,244\\,353.