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:
#include<stdio.h>
#include<algorithm>
#include<math.h>
#include<vector>
using namespace std;
const double EPS = 1e-10;
const double INF = 1e+10;
const double PI = acos(-1);
int sig(double r) { return (r < -EPS) ? -1 : (r > +EPS) ? +1 : 0; }
inline double ABS(double a){return max(a,-a);}
struct Pt {
	double x, y;
	Pt() {}
	Pt(double x, double y) : x(x), y(y) {}
	Pt operator+(const Pt &a) const { return Pt(x + a.x, y + a.y); }
	Pt operator-(const Pt &a) const { return Pt(x - a.x, y - a.y); }
	Pt operator*(const Pt &a) const { return Pt(x * a.x - y * a.y, x * a.y + y * a.x); }
	Pt operator-() const { return Pt(-x, -y); }
	Pt operator*(const double &k) const { return Pt(x * k, y * k); }
	Pt operator/(const double &k) const { return Pt(x / k, y / k); }
	double ABS() const { return sqrt(x * x + y * y); }
	double abs2() const { return x * x + y * y; }
	double arg() const { return atan2(y, x); }
	double dot(const Pt &a) const { return x * a.x + y * a.y; }
	double det(const Pt &a) const { return x * a.y - y * a.x; }
};
double tri(const Pt &a, const Pt &b, const Pt &c) { return (b - a).det(c - a); }
int iSP(Pt a, Pt b, Pt c) {
	int s = sig((b - a).det(c - a));
	if (s) return s;
	if (sig((b - a).dot(c - a)) < 0) return -2; // c-a-b
	if (sig((a - b).dot(c - b)) < 0) return +2; // a-b-c
	return 0;
}
Pt pLL(Pt a, Pt b, Pt c, Pt d) {
	b = b - a; d = d - c; return a + b * (c - a).det(d) / b.det(d);
}
bool iLS(Pt a, Pt b, Pt c, Pt d) {
	return (sig(tri(a, b, c)) * sig(tri(a, b, d)) <= 0);
}
bool iSS(Pt a, Pt b, Pt c, Pt d) {
	return (iSP(a, b, c) * iSP(a, b, d) <= 0 && iSP(c, d, a) * iSP(c, d, b) <= 0);
}

Pt p[30];
double t[110];
double vx[110];
double vy[110];
double ret[110];
double h[110];
double sx[110];
double sl[110];
double tx[110];
double ty[110];
int main(){
	int a,b,c;
	while(scanf("%d%d%d",&a,&b,&c),a){
		for(int i=0;i<a;i++){
			double x,y;scanf("%lf%lf",&x,&y);
			p[i]=Pt(x,y);
		}
		for(int i=0;i<c;i++)ret[i]=999999999;
		for(int i=0;i<b;i++){
			scanf("%lf%lf%lf",t+i+1,vx+i,vy+i);
		}
		t[b+1]=999999999;
		vx[b]=vy[b]=0;
		for(int i=0;i<c;i++){
			scanf("%lf%lf%lf%lf%lf",h+i,sx+i,tx+i,ty+i,sl+i);
		}
		for(int i=0;i<a;i++){
			Pt now=p[i];
			for(int j=0;j<b;j++){
				Pt to=now+Pt(vx[j],vy[j])*(t[j+1]-t[j]);
				for(int k=0;k<c;k++){
					if(iLS(Pt(sx[k],0),Pt(sx[k]+tx[k],ty[k]),now,to)){
						Pt at=pLL(Pt(sx[k],0),Pt(sx[k]+tx[k],ty[k]),now,to);
						double T=t[j]+(at-now).ABS()/Pt(vx[j],vy[j]).ABS();
						Pt L=Pt(sx[k],0)-Pt(tx[k],ty[k])/Pt(tx[k],ty[k]).ABS()*sl[k]+Pt(tx[k],ty[k])*(T-h[k]);
						Pt R=Pt(sx[k],0)+Pt(tx[k],ty[k])*(T-h[k]);
						if(T-h[k]>0&&T>t[j]&&T<t[j+1]&&iSP(L,at,R)==2){
							ret[k]=min(ret[k],T);
						}
					}
				}
				now=to;
			}
		}
	//	for(int i=0;i<c;i++)printf("%f\n",ret[i]);
		for(int i=0;i<c;i++){
			Pt org=Pt(0,0);
			for(int j=0;j<=b;j++){
				Pt v=Pt(tx[i],ty[i])-Pt(vx[j],vy[j]);
				Pt L=Pt(sx[i],0)-Pt(tx[i],ty[i])/Pt(tx[i],ty[i]).ABS()*sl[i]+Pt(tx[i],ty[i])*(t[j]-h[i])-org;
				Pt L2=L+v*(t[j+1]-t[j]);
				Pt R=Pt(sx[i],0)+Pt(tx[i],ty[i])*(t[j]-h[i])-org;
				Pt R2=R+v*(t[j+1]-t[j]);
				for(int k=0;k<a;k++){
					if(iSS(L,L2,p[k],p[(k+1)%a])){
						Pt at=pLL(L,L2,p[k],p[(k+1)%a]);
						double tt=t[j]+(at-L).ABS()/v.ABS();
						if(tt>h[i])ret[i]=min(ret[i],tt);
					}
					if(iSS(R,R2,p[k],p[(k+1)%a])){
						Pt at=pLL(R,R2,p[k],p[(k+1)%a]);
						double tt=t[j]+(at-R).ABS()/v.ABS();
						if(tt>h[i])ret[i]=min(ret[i],tt);
					}
				}
				org=org+Pt(vx[j],vy[j])*(t[j+1]-t[j]);
			}
		}
	//	for(int i=0;i<c;i++)printf("%f\n",ret[i]);
		vector<double>ans;
		for(int i=0;i<c;i++){
			if(ret[i]<9999999)ans.push_back(ret[i]);
		}
		std::sort(ans.begin(),ans.end());
		printf("%d\n",ans.size());
		for(int i=0;i<ans.size();i++)printf("%.12f\n",ans[i]);
	}
}