Berland is facing dark times again. The army of evil lord Van de Mart is going to conquer the whole kingdom. To the council of war called by the Berland's king Valery the Severe came n knights. After long discussions it became clear that the kingdom has exactly n control points (if the enemy conquers at least one of these points, the war is lost) and each knight will occupy one of these points. 

Berland is divided into m + 1 regions with m fences, and the only way to get from one region to another is to climb over the fence. Each fence is a circle on a plane, no two fences have common points, and no control point is on the fence. You are given k pairs of numbers ai, bi. For each pair you have to find out: how many fences a knight from control point with index ai has to climb over to reach control point bi (in case when Van de Mart attacks control point bi first). As each knight rides a horse (it is very difficult to throw a horse over a fence), you are to find out for each pair the minimum amount of fences to climb over.

Input

The first input line contains three integers n, m, k (1 ≤ n, m ≤ 1000, 0 ≤ k ≤ 100000). Then follow n lines, each containing two integers Kxi, Kyi ( - 109 ≤ Kxi, Kyi ≤ 109) — coordinates of control point with index i. Control points can coincide.

Each of the following m lines describes fence with index i with three integers ri, Cxi, Cyi (1 ≤ ri ≤ 109,  - 109 ≤ Cxi, Cyi ≤ 109) — radius and center of the circle where the corresponding fence is situated.

Then follow k pairs of integers ai, bi (1 ≤ ai, bi ≤ n), each in a separate line — requests that you have to answer. ai and bi can coincide.

Output

Output exactly k lines, each containing one integer — the answer to the corresponding request.

Examples

Input

2 1 1
0 0
3 3
2 0 0
1 2


Output

1


Input

2 3 1
0 0
4 4
1 0 0
2 0 0
3 0 0
1 2


Output

3
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.util.*;

public class Main implements Runnable {
	private boolean _READ_FROM_FILE = false; //System.getSecurityManager() == null; //System.getProperty("ONLINE_JUDGE") == null;
	private boolean _WRITE_TO_FILE = false;
	static final String _TASK_ID = "in";
	static final String _IN_FILE = _TASK_ID + ".in";
	static final String _OUT_FILE = _TASK_ID + ".out";
	BufferedReader reader;
	StringTokenizer tokenizer;

	class Point {
		long x, y;
		public Point(long x, long y) {
			this.x = x;
			this.y = y;
		}
		public long dist2(Point a) {
			long dx = x - a.x;
			long dy = y - a.y;
			return dx*dx + dy*dy;
		}
	}
	
	class Circle {
		Point center;
		long radius;
		public Circle(long r, Point c) {
			center = c;
			radius = r;
		}
		public boolean isInside(Point a) {
			return radius * radius > center.dist2(a);
		}
	}
	
	class Query {
		int u, v;
		int ans = -1;
		public Query(int u, int v) {
			this.u = u;
			this.v = v;
		}
		public String toString() {
			return u + " " + v + " " + ans;
		}
	}
	
	class DisjointSet {
		int[] parent, rank, ancestor;
		public DisjointSet(int n) {
			parent = new int[n];
			rank = new int[n];
			ancestor = new int[n];
			
			for (int i = 0; i < parent.length; i++) {
				parent[i] = i;
				ancestor[i] = i;
			}
		}
		public void join(int i, int j) {
			i = findSet(i);
			j = findSet(j);
			if (i != j) {
				if (rank[i] < rank[j])
					parent[i] = j;
				else {
					parent[j] = i;
					if (rank[i] == rank[j])
						++rank[i];
				}
			}
		}
		public int findSet(int i) {
			if (parent[i] == i)
				return i;
			return parent[i] = findSet(parent[i]);
		}
	}
	
	private void core() throws Exception {
		int n = nextInt(), m = nextInt(), nq = nextInt();
		Point[] knights = new Point[n];
		for (int i = 0; i < knights.length; i++) {
			knights[i] = new Point(nextLong(), nextLong());
		}
		
		Circle[] circles = new Circle[m + 1];
		for (int i = 1; i < circles.length; i++) {
			circles[i] = new Circle(nextLong(), new Point(nextLong(), nextLong()));
		}
		
		LinkedList<Integer>[] adj = new LinkedList[circles.length];
		for (int i = 0; i < adj.length; i++) {
			adj[i] = new LinkedList<Integer>();
		}
		int[] parent = new int[circles.length];
		parent[0] = -1;
		for (int i = 1; i < parent.length; i++) {
			parent[i] = 0;
			long min = Integer.MAX_VALUE;
			for (int j = 1; j < parent.length; j++) {
				if (i != j) {
					if (circles[i].radius < circles[j].radius && circles[j].isInside(circles[i].center)) {
						if (circles[j].radius < min) {
							min = circles[j].radius;
							parent[i] = j;
						}
					}
				}
			}
			adj[parent[i]].add(i);
		}
		
		int[] kPos = new int[n];
		for (int i = 0; i < kPos.length; i++) {
			kPos[i] = 0;
			long min = Integer.MAX_VALUE;
			for (int j = 1; j < circles.length; j++) {
				if (circles[j].isInside(knights[i])) {
					if (circles[j].radius < min) {
						min = circles[j].radius;
						kPos[i] = j;
					}
				}
			}
		}
		
		LinkedList<Integer>[] asked = new LinkedList[circles.length];
		for (int i = 0; i < asked.length; i++) {
			asked[i] = new LinkedList<Integer>();
		}
		Query[] queries = new Query[nq];
		for (int i = 0; i < nq; i++) {
			int u = kPos[nextInt() - 1];
			int v = kPos[nextInt() - 1];
			queries[i] = new Query(u, v);
			asked[u].add(i);
			asked[v].add(i);
		}
		
		boolean[] vis = new boolean[parent.length];
		DisjointSet set = new DisjointSet(vis.length);
		go(0, adj, vis, set, asked, queries);
		
		int[][] path = new int[parent.length][parent.length];
		for (int i = 0; i < path.length; i++) {
			int j = i;
			int c = 0;
			for(; j != -1; j = parent[j]) {
				path[i][j] = path[j][i] = c;
				++c;
			}
		}
		for (int i = 0; i < queries.length; i++) {
			System.out.println(path[queries[i].u][queries[i].ans] + path[queries[i].v][queries[i].ans]);
		}
	}
	private void go(int i, LinkedList<Integer>[] adj, boolean[] vis, DisjointSet set, LinkedList<Integer>[] asked, Query[] queries) {
		vis[i] = true;
		for (int j : adj[i]) {
			go(j, adj, vis, set, asked, queries);
			set.join(j, i);
			set.ancestor[set.findSet(i)] = i;
		}
		for (int k : asked[i]) {
			if (queries[k].u == i && vis[queries[k].v]) {
				queries[k].ans = set.ancestor[set.findSet(queries[k].v)];
			}
			else if (queries[k].v == i && vis[queries[k].u]) {
				queries[k].ans = set.ancestor[set.findSet(queries[k].u)];
			}
		}
	}
	void debug(Object...os) {
		System.out.println(Arrays.deepToString(os));
	}
//--------------------- IO stuffs ---------------------
    public static void main(String[] args) throws InterruptedException {
        Thread thread = new Thread(new Main());
        thread.start();
        thread.join();
    }
	public void run() {
        try {
        	reader = new BufferedReader(_READ_FROM_FILE ? new FileReader(_IN_FILE) : new InputStreamReader(System.in));
        	System.setOut(new PrintStream(new BufferedOutputStream(_WRITE_TO_FILE ? new FileOutputStream(_OUT_FILE) : System.out)));
            tokenizer = new StringTokenizer("");
            core();
            reader.close();
            System.out.flush();
            System.out.close();
            System.exit(0);
        } catch (Exception e) {
        	System.out.flush();
            e.printStackTrace();
            System.exit(1);
        }
    }
    int nextInt() throws Exception {
        return Integer.parseInt(nextToken());
    }
    long nextLong() throws Exception {
        return Long.parseLong(nextToken());
    }
    double nextDouble() throws Exception {
        return Double.parseDouble(nextToken());
    }
    String nextToken() throws Exception {
        while (!tokenizer.hasMoreTokens())
			tokenizer = new StringTokenizer(reader.readLine());
        return tokenizer.nextToken();
    }
    boolean nextIsAvailable() throws Exception {
    	while (!tokenizer.hasMoreElements()) {
    		String line = reader.readLine();
    		if (line == null) return false;
    		tokenizer = new StringTokenizer(line);
    	}
    	return true;
    }
}
