Problem: Princess, a Strategist

Princess is a strategist

English text is not available in this practice contest.

A brave princess in a poor country is on an adventure to escape the castle and obtain ancient treasures. However, the area around the ancient treasure is protected by multiple guardians and cannot be reached in the usual way. So, the princess deceived you as a servant and thought of a strategy to retrieve the treasure while attracting the attention of the Guardians. It's not enough to have any number of lives to do such a thing, but I can't help but obey the orders of the princess. So, first of all, you scouted in advance and carefully investigated how to move to avoid the Guardian's attack and attract attention. Your job is to write a program based on these findings to calculate when and how many decoy bullets fired by you and the Guardian collided.

First, for simplicity, consider a two-dimensional plane looking down from a sufficiently high place as a field. And you are equipped with armor to protect yourself from Guardian attacks. Therefore, you can think of your shape as a polygon. Note that the line segments of this polygon do not intersect or overlap at all. You can also assume the following about your movement.

* Only constant velocity linear motion.
* Acceleration, deceleration, and turning are all done in an instant.
* Since it does not rotate, the orientation does not change at all from the initial state.
* All parts of the polygon are always in the positive y coordinate.



The following can be assumed for the bullets fired by the Guardian.

* The thickness of the bullet fired by the Guardian is negligible
* The bullets fired by the Guardian have a finite length
* If a bullet of length l is fired from the start coordinates (x, 0) with a velocity vector (vx, vy), the end coordinates of the bullet are at the following points (Note: of the bullet at the moment the bullet is fired) All leading y coordinates are 0):
\ (x-\ (l * vx / sqrt \ (vx ^ 2 + vy ^ 2 \) \), 0-\ (l * vy / sqrt \ (vx ^ 2 + vy ^ 2 \) \)
* For example, in the case where a bullet of velocity vector (3, 4) length 10 is fired from point (4, 0), the bullet ends at (-2, -8).
* All bullet-to-bullet collisions fired by enemy characters are ignored



The definition of a bullet collision between you and the Guardian is given below. Let the bullet collision time be the time when the common point between the polygons that make up you and the line segment fired by the Guardian first occurs. If you collide with a bullet fired by a guardian, you will only be damaged and will not hinder your movement, and the bullet that collides with you will disappear the moment it collides. It is guaranteed that the collision time will change by at most 10-5 even if you translate in any direction from the initial position in the range of 10-6.

Input

The input consists of multiple datasets.

Each dataset is given in the following format.

> N M B
> X1 Y1
> ...
> XN YN
> T1 VX1 VY1
> ...
> TM VXM VYM
> T'1 X'1 VX'1 VY'1 L1
> ...
> T'B X'B VX'B VY'B LB

Three non-negative integers N (3 ≤ N ≤ 20), M (0 ≤ M ≤ 100), and B (0 ≤ B ≤ 100) are given at the beginning of each dataset. These represent the number of vertices of your polygon, the number of information about your movement, and the number of bullets fired by the Guardian, respectively.

In the next N lines, the coordinates of the vertices of the polygon representing you at time 0 are listed in order. (Xi, Yi) (1 ≤ i ≤ N) represent the coordinates of the i-th vertex of the polygon, respectively. All of these values ​​are integers and satisfy -10,000 ≤ Xi ≤ 10,000, 0 <Yi ≤ 10,000.

The next M line gives you M instructions to indicate your move. The i-th (1 ≤ i ≤ M) move instruction consists of three integers Ti, VXi, VYi, which keeps your velocity vector at (VXi, VYi) from time Ti-1 to Ti. It means to do. However, 0 = T0 <T1 <T2 <... <TM ≤ 10,000, -100 ≤ VXi ≤ 100, -100 ≤ VYi ≤ 100. After you have completed all move instructions (ie, after time TM), you shall stop moving and stay in place. Note that bullet collisions can occur even after you stop, and you need to consider such collisions in your output.

The following line B contains information about the B bullets fired by the Guardian. Information about the i-th (1 ≤ i ≤ B) bullet is represented by the five integers T'i, X'i, VX'i, VY'i and Li, which are coordinated (X') at time T'i. It means that a bullet of length Li with a velocity vector (VX'i, VY'i) is fired from i, 0). These values ​​are 0 ≤ T'1 ≤ T'2 ≤ ... ≤ T'B ≤ 10,000, -10,000 ≤ X'i ≤ 10,000, -100 ≤ VX'i ≤ 100, 0 <VY'i ≤ 100, Satisfy 0 <Li ≤ 100.

The last dataset is followed by a line with "0 0 0", which means the end of the dataset. This is not part of the dataset.

Output

At the beginning of the output for each dataset, print n the number of times you hit the bullet fired by the Guardian. In the next n lines, output the time when you hit the bullet fired by the Guardian in ascending order with an accuracy of at most 0.001.

Sample Input


4 1 1
1 1
1 2
-1 2
-1 1
2 1 0
0 1 0 1 2
0 0 0


Output for the Sample Input


1
1.000






Example

Input

4 1 1
1 1
1 2
-1 2
-1 1
2 1 0
0 1 0 1 2
0 0 0


Output

1
1.000

Solution (in CPP):

Solution:
// * template

#include <bits/stdc++.h>
#ifdef LOCAL
#include "dump.hpp"
#else
#define dump(...)
#endif

using namespace std;

template<class T> inline void chmax(T &a, const T &b) { if(a < b) a = b; }
template<class T> inline void chmin(T &a, const T &b) { if(a > b) a = b; }

template<class T, class U> inline void fill_array(T &e, const U &v) { e = v; }
template<class T, class U, size_t s> inline void fill_array(T (&a)[s], const U &v) {for(auto&e:a)fill_array(e,v);}
template<class T, class U, size_t s> inline void fill_array(array<T, s> &a, const U &v) {for(auto&e:a)fill_array(e,v);}
template<class T, class U> inline void fill_array(vector<T> &a, const U &v) {for(auto&e:a)fill_array(e,v);}

struct range {
	typedef int Int;
	struct iter {
		Int i;
		const Int s;
		constexpr iter(const Int &i_, const Int &s_):i(i_), s(s_) {}
		constexpr bool operator!=(const iter &r) const { return s > 0 ? i < r.i : i > r.i; }
		constexpr const Int &operator*() const { return i; }
		iter &operator++() { i += s; return *this; }
	};
	const Int f, l, s;
	constexpr range(const Int &f_, const Int &l_, const Int &s_):f(f_), l(l_), s(s_) {}
	constexpr range(const Int &f_, const Int &l_):f(f_), l(l_), s(1) {}
	constexpr range(const Int &num):f(0), l(num), s(1) {}
	constexpr iter begin() const { return iter(f, s); }
	constexpr iter end() const { return iter(l, s); }
};

// * geoetry template
typedef double Real;
constexpr Real EPS = 1e-8;
int sign(Real d) { return d > EPS ? 1 : d < -EPS ? -1 : 0; }

// * define class

struct Point {
	Real x, y;
	Point():x(0), y(0) {}
	Point(Real x_, Real y_):x(x_), y(y_) {}
	Point &operator+=(const Point &p) { x += p.x; y += p.y; return *this; }
	Point &operator-=(const Point &p) { x -= p.x; y -= p.y; return *this; }
	Point &operator*=(Real s) { x *= s; y *= s; return *this; }
	Point &operator/=(Real s) { x /= s; y /= s; return *this; }
	Point operator-() const { return Point(-x, -y); }
	Point operator+(const Point &p) const { return Point(*this) += p; }
	Point operator-(const Point &p) const { return Point(*this) -= p; }
	Point operator*(Real s) const { return Point(*this) *= s; }
	Point operator/(Real s) const { return Point(*this) /= s; }
	bool operator<(const Point &p) const { return sign(x - p.x) == -1 || (sign(x - p.x) == 0 && sign(y - p.y) == -1); }
	bool operator>(const Point &p) const { return p < *this; }
	bool operator==(const Point &p) const { return sign(x - p.x) == 0 && sign(y - p.y) == 0; }
	bool operator!=(const Point &p) const { return !(*this == p); }
};

inline istream &operator>>(istream &is, Point &p) {
	return is >> p.x >> p.y;
}

inline ostream &operator<<(ostream &os, const Point &p) {
	return os << '(' << p.x << ", " << p.y << ')';
}

struct Line : public array<Point, 2> {
	Line(const Point &a, const Point &b) { at(0) = a; at(1) = b; }
};

struct Segment : public array<Point, 2> {
	Segment(const Point &a, const Point &b) { at(0) = a; at(1) = b; }
};

struct Circle {
	Point c;
	Real r;
	Circle(const Point &c_, Real r_):c(c_), r(r_) {}
};

typedef vector<Point> Polygon;

// * define base function

Point rotate90(const Point &p) {
	return Point(-p.y, p.x);
}

Point rotate(const Point &p, Real theta) {
	const Real s = sin(theta), c = cos(theta);
	return Point(c * p.x - s * p.y, s * p.x + c * p.y);
}

Real angle(const Point &p) {
	return atan2(p.y, p.x);
}

Real norm(const Point &p) {
	return p.x * p.x + p.y * p.y;
}

Real abs(const Point &p) {
	return sqrt(norm(p));
}

Real dot(const Point &a, const Point &b) {
	return a.x * b.x + a.y * b.y;
}

Real cross(const Point &a, const Point &b) {
	return a.x * b.y - a.y * b.x;
}

// * define app function

enum { CCW = 1, CW = -1, BACK = 2, FRONT = -2, ON = 0};
int ccw(const Point &a, const Point &b, const Point &c) { // a:p0, b:p1, c:p2
	const Point p = b - a;
	const Point q = c - a;
	const int sign_cross = sign(cross(p, q));

	if(sign_cross == 1) return CCW;
	if(sign_cross == -1) return CW;
	if(sign(dot(p, q)) == -1) return BACK;
	if(sign(norm(p) - norm(q)) == -1) return FRONT;
	return ON;
}

Point project(const Line &l, const Point &p) {
	const Point a = p - l[0];
	const Point b = l[1] - l[0];
	return l[0] + b * (dot(a, b) / norm(b));
}

Point reflect(const Line &l, const Point &p) {
	const Point t = project(l, p);
	return t + (t - p);
}

bool intersect(const Segment &s, const Point &p) {
	return ccw(s[0], s[1], p) == ON;
}

bool intersect(const Segment &a, const Segment &b) {
	return ccw(a[0], a[1], b[0]) * ccw(a[0], a[1], b[1]) <= 0
		&& ccw(b[0], b[1], a[0]) * ccw(b[0], b[1], a[1]) <= 0;
}

bool intersect(const Line &l, const Point &p) {
	return abs(ccw(l[0], l[1], p)) != 1;
}

bool intersect(const Line &l, const Segment &s) {
	return sign(cross(l[1] - l[0], s[0] - l[0]) * cross(l[1] - l[0], s[1] - l[0])) <= 0;
}

bool intersect(const Line &a, const Line &b) {
	return sign(cross(a[1] - a[0], b[1] - b[0])) != 0
		|| sign(cross(a[1] - a[0], b[1] - a[0])) == 0;
}

Real dist(const Point &a, const Point &b) {
	return abs(a - b);
}

Real dist(const Line &l, const Point &p) {
	const Point a = l[1] - l[0];
	const Point b = p - l[0];
	return abs(cross(a, b)) / abs(a);
}

Real dist(const Line &l, const Segment &s) {
	if(intersect(l, s)) return 0;
	return min(dist(l, s[0]), dist(l, s[1]));
}

Real dist(const Line &a, const Line &b) {
	if(intersect(a, b)) return 0;
	return dist(a, b[0]);
}

Real dist(const Segment &s, const Point &p) {
	if(sign(dot(s[1] - s[0], p - s[0])) == -1) return dist(s[0], p);
	if(sign(dot(s[0] - s[1], p - s[1])) == -1) return dist(s[1], p);
	return dist(Line(s[0], s[1]), p);
}

Real dist(const Segment &a, const Segment &b) {
	if(intersect(a, b)) return 0;
	return min({dist(a, b[0]), dist(a, b[1]), dist(b, a[0]), dist(b, a[1])});
}

Point crosspoint(const Segment &a, const Segment &b) {
	const Real crs = cross(a[1] - a[0], b[1] - b[0]);
	if(sign(crs) == 0) { // on same line
		if(intersect(a, b[0])) return b[0];
		if(intersect(a, b[1])) return b[1];
		if(intersect(b, a[0])) return a[0];
		return a[1];
	}
	return b[0] + (b[1] - b[0]) * (cross(a[1] - a[0], a[1] - b[0]) / crs);
}

// * solve

Real collision_time(const Segment &s, const Point &p, const Point &v) {
	const Segment seg(p, p + v * 1e7);
	if(!intersect(s, seg)) return numeric_limits<Real>::max();
	const Point cp = crosspoint(s, seg);
	return abs(cp - p) / abs(v);
}

Real collision_time(const Segment &a, const Segment &b, const Point &v_a) {
	return min({collision_time(a, b[0], -v_a), collision_time(a, b[1], -v_a),
				collision_time(b, a[0], v_a), collision_time(b, a[1], v_a)});
}

int main() {
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	cout.setf(ios::fixed);
	cout.precision(10);

	for(int n, m, b; cin >> n >> m >> b && n;) {
		Polygon body(n);
		for(auto &p : body) cin >> p;

		vector<int> t_body(m + 2);
		vector<Point> v_body(m + 1);
		for(int i = 0; i < m; ++i) {
			cin >> t_body[i + 1] >> v_body[i];
		}
		t_body[m + 1] = INT_MAX;
		v_body[m] = Point(0, 0);

		vector<int> t_shoot(b), l_shoot(b);
		vector<Point> p_shoot(b), v_shoot(b);
		for(int i = 0; i < b; ++i) {
			cin >> t_shoot[i] >> p_shoot[i].x >> v_shoot[i] >> l_shoot[i];
		}

		vector<bool> hit(b, false);
		vector<Real> t_hit;

		for(int i = 0; i <= m; ++i) {
			for(int j = 0; j < b; ++j) {
				if(hit[j]) continue;
				if(t_shoot[j] >= t_body[i + 1]) break;

				const Point v = v_shoot[j] - v_body[i];
				if(sign(abs(v)) == 0) continue;

				const Real T = t_body[i] - t_shoot[j];
				const Point s = p_shoot[j] + v_shoot[j] * T;

				const Segment bullet(s, s - v_shoot[j] * (l_shoot[j] / abs(v_shoot[j])));
				Real min_time = numeric_limits<Real>::max();
				dump(bullet, v);

				Point prev = body.back();
				for(const Point &current : body) {
					const Segment seg(prev, current);

					const Real t = collision_time(bullet, seg, v);
					if(sign(t) >= 0) chmin(min_time, t + t_body[i]);

					prev = current;
				}

				if(sign(min_time - t_body[i + 1]) <= 0) {
					hit[j] = true;
					t_hit.emplace_back(min_time);
				}
			}

			Point v = v_body[i] * (t_body[i + 1] - t_body[i]);
			for(auto &p : body) {
				p += v;
			}
		}

		sort(begin(t_hit), end(t_hit));
		cout << t_hit.size() << '\n';
		for(const auto &e : t_hit) {
			cout << e << '\n';
		}
	}

	return EXIT_SUCCESS;
}