Given an dimensional grid with coordinates in the form , determine the number of shortest paths from to , that do not pass through blocked points.
A path consists of a series of movements where for any single movement, you must increase a single by unit.
The first line will contain a single integer, , .
The next line will contain integers representing , .
The next line will contain a single integer, , .
The next lines will each contain a single coordinate point , .
The points will be unique and will not include or .
The number of ways to traverse the grid, modulo .
2 3 4 2 2 2 1 4