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<bits/stdc++.h>
using namespace std;
using Int = long long;
using ll = long long;
template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b)a=b;};
template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b)a=b;};
#define F first
#define S second

namespace Geometry{

  typedef long double D;
  typedef complex<long double> P;
  typedef pair<P, D> C;

  const D EPS = 1e-8;
  const D PI = asin(1) * 2;
  const D INF = 1e18;
  
  D dot(P p1, P p2){
    return p1.real() * p2.real() + p1.imag() * p2.imag();
  }

  D cross(P p1, P p2){
    return p1.real() * p2.imag() - p1.imag() * p2.real();
  }

  D area(const vector<P> poly){
    D ans = 0;
    for(int i=2;i<(int)poly.size();i++)
      ans += cross(poly[i-1] - poly[0], poly[i] - poly[0]);
    return abs(ans)/2;
  }

  bool intersectSL(P p1, P p2, P vec){
    vec /= abs(vec); p1 /= vec, p2/= vec;
    return
      (p1.imag() < EPS && p2.imag() >= -EPS) ||
      (p1.imag() > -EPS && p2.imag() < EPS);
  }
  bool intersectSL(P p1, P p2, P p3, P p4){
    return intersectSL(p1 - p4, p2 - p4, p3 - p4);
  }

  bool intersectSS(P p1, P p2, P p3, P p4){
    return
      (dot(p2 -p1, p3 - p1) < -EPS && dot(p2 - p1, p4 - p1) < -EPS) ||
			      (dot(p1-p2, p3 - p2) < -EPS && dot(p1 - p2, p4 - p2) < -EPS)? false:intersectSL(p1, p2, p3, p4) && intersectSL(p3, p4, p1, p2);		     			      }
  D distLP(P vec, P x){
    return abs((x/vec).imag()) * abs(vec);
  }

  D distLP(P p1, P p2, P x){return distLP(p2 - p1, x - p1);}
  
  D distSP(P p1, P p2, P x){
    return dot(p2 - p1, x - p1) < -EPS?
				  abs(x-p1):dot(p1 - p2, x - p2) < -EPS? abs(x - p2):distLP(p1, p2, x);
  }

  P crosspointLL(P p1, P p2, P vec){return abs(cross(p2 - p1, vec)) < EPS? vec: vec * cross(p2 - p1, p2)/ cross(p2 - p1, vec);}
  P crosspointLL(P p1, P p2, P p3, P p4){return p4 + crosspointLL(p1 - p4, p2 - p4, p3 - p4);}
  
  P crosspointSS(P p1, P p2, P p3, P p4){
    return distSP(p1, p2, p3) < EPS? p3:distSP(p1, p2, p4)<EPS? p4:crosspointLL(p1, p2, p3, p4);
  }
  
};
using namespace Geometry;
typedef long double GType;
typedef std::complex<GType> Point;
typedef std::pair<Point, Point> Segment;
int ccw(const Point& p1, const Point& p2, const Point& p3) {
    Point v1 = p2 - p1, v2 = p3 - p1;
    if (cross(v1, v2) > EPS) return +1;
    if (cross(v1, v2) < -EPS) return -1;
    if (dot(v1, v2) < -EPS) return +2;
    if (std::norm(v1) < std::norm(v2)) return -2;
    return 0;
}
 
// ------ Functions Level 2 ------ //
bool intersect(const Segment& s1, const Point& p1, bool segflag) {
    if (!segflag) return std::abs(cross(s1.second - p1, s1.first - p1)) < EPS;
    return (std::abs(s1.first - p1) + std::abs(s1.second - p1) - std::abs(s1.second - s1.first)) < EPS;
}
bool intersect(const Segment& s1, const Segment& s2, bool segflag) {
    if (!segflag) return cross(s1.second - s1.first, s2.first - s1.first) * cross(s1.second - s1.first, s2.second - s1.first) < EPS;
    return (ccw(s1.first, s1.second, s2.first) * ccw(s1.first, s1.second, s2.second)) <= 0 && (ccw(s2.first, s2.second, s1.first) * ccw(s2.first, s2.second, s1.second)) <= 0;
}



bool contain(P p,vector<P> &poly){
  D a=0;
  if(area(poly)<EPS){return false;}
  for(int i=1;i<=poly.size();i++){
    a+=area({p,poly[i-1],poly[i%poly.size()]});
  }
  return abs(a-area(poly))<EPS;
}
vector<P> sqar(pair<P,P> L,P vec,D t){
  return {L.F,L.S,L.S+vec*t,L.F+vec*t};
}

bool intersectPP(vector<P> poly,vector<P> me){
  for(int i=1;i<=me.size();i++){
    if(contain(me[i-1],poly)){return true;}
    for(int j=1;j<=poly.size();j++){
      //if(intersect({poly[j-1],poly[j%poly.size()]},{me[i-1],me[i%me.size()]},true)){return true;}
      if(intersectSS(poly[j-1],poly[j%poly.size()],me[i-1],me[i%me.size()])){return true;}
    }
  }
  return false;
}


signed main(){
  cin.tie(0);
  ios::sync_with_stdio(0);
  ll n,m,b;
  while(cin>>n>>m>>b,n){
  vector<P> A(n);
  for(auto &I:A){
    D x,y;
    cin>>x>>y;
    I={x,y};
  }
  vector<pair<P,D>> V(m);
  for(auto &I:V){
    D x,y;
    cin>>I.S>>x>>y;
    I.F={x,y};
  }
  
  V.push_back({{0,0},INF});
  vector<pair<pair<P,P>,P>> L(b);
  for(auto &I:L){
    D t,X,x,y,l;
    cin>>t>>X>>x>>y>>l;
    I.F.F=P(X,0);
    I.S={x,y};
    I.F.S=I.F.F-I.S/abs(I.S)*l;
    I.F.F-=I.S*t;
    I.F.S-=I.S*t;
  }
  for(ll i=m-1;i>0;i--){V[i].S-=V[i-1].S;}
  vector<D> ans(b,INF*2);
  
  for(int i=0;i<b;i++){
    pair<P,P> l=L[i].F;
    D time=0;
    for(auto &I:V){
      P vec=L[i].S-I.F;
      auto judge=[&](D t){return intersectPP(sqar(l,vec,t),A);};
      if(!judge(I.S)){
	time+=I.S;
	l.F+=vec*I.S;
	l.S+=vec*I.S;
	continue;
      }
      D lf=0,rg=I.S;
      for(int k=0;k<100;k++){
	D m=(lf+rg)/2;
	if(judge(m)){rg=m;}
	else{lf=m;}
      }
      ans[i]=lf+time;
      // cout<<i<<" "<<I.F<<" "<<I.S<<" "<<lf<<" "<<time<<endl;
      break;
    }
  }
  sort(ans.begin(),ans.end());
  ll cnt=0;
  for(auto &I:ans){if(I<INF){cnt++;}}
  cout<<cnt<<endl;
  if(cnt==6&&ans[0]<EPS){
    //cerr<<n<<" "<<m<<" "<<b<<endl;
  }
  for(int i=0;i<cnt;i++){
    cout<<fixed<<setprecision(12)<<ans[i]<<endl;
  }
  }  
  return 0;
}