target
题号:NC237191
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

PaiGuDragon participated in a target training and shot n shots in total. The i th shot hit the points (x_i, y_i) in the Cartesian coordinate system, (x_i, y_i are integers).

The evaluation methods of training results are as follows:

Given strictly monotonically increasing sequences d_1,d_2...,d_k and strictly monotonically decreasing sequences score_1, score_2,..., score_k

The bull's-eye coordinates are (cx, cy), where cx, cy are also integers.

For the position (x_i, y_i) in the i th shot, find the Manhattan distance between (x_i, y_i) and (cx, cy)

* If PaiGuDragon miss the target, i.e. , l points will be deducted

* Otherwise, score_1, scrore_2,...,score_k from inside to outside, that is, find the smallest j such that , and then get score_j points.

The PaiGuDragon was very disappointed with his result, so he decided to redefine the position of the bull's-eye and seek the maximum score.

Please help him calculate the maximum  scores he can get after redefine the position of the bull's-eye.

输入描述:

The first line contains 3 integers .

The second line contains k integers d_1,d_2,....d_k - Manhattan distance to bull's-eye

The third line contains k integers score_1, score_2,...score_k - scores ordered by distance to bull's eye.



For each in next n lines contains 2 integers x_i, y_i - the position of the i th shot.

输出描述:

Output an integer - the maximum score
示例1

输入

复制
4 2 0
0 1
2 1
0 0
0 1
1 0
1 1

输出

复制
4
示例2

输入

复制
4 2 1
0 1
2 1
0 0
0 1
1 0
1 1

输出

复制
3