#include<bits/stdc++.h>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define HUGE_NUM 99999999999999999
#define MOD 1000000007
#define EPS 0.000000001
using namespace std;



#define NUM 105

struct Point{
	Point(double arg_x,double arg_y,double arg_arrive_time){
		x = arg_x;
		y = arg_y;
		arrive_time = arg_arrive_time;
	}

	Point(){
		x = y = 0.0;
		arrive_time = 0;
	}

	Point operator + (Point p){ return Point(x+p.x,y+p.y,arrive_time); }
	Point operator - (Point p){ return Point(x-p.x,y-p.y,arrive_time);}
	Point operator * (double a){ return Point(a*x,a*y,arrive_time); }
	Point operator / (double a){ return Point(x/a,y/a,arrive_time); }

	double abs(){ return sqrt(norm()); }
	double norm(){ return x*x + y*y; }

	bool operator<(const Point &p) const{
		return x != p.x? x < p.x: y < p.y;
	}

	bool operator == (const Point &p) const{
		return fabs(x-p.x) < EPS && fabs(y-p.y) < EPS;
	}

	double x,y,arrive_time;
};
typedef Point Vector;

struct Line{
	Point p[2];
	Line(Point p1,Point p2){
		p[0] = p1;
		p[1] = p2;
	}
	Line(){

	}
};

typedef vector<Point> Polygon;

struct Info{

	double R;
	vector<Line> LINE;
	int num_point;
};

int N;
int boss[NUM],height[NUM];
int start_index,goal_index;
double UNIT_TIME = 10.0;
Point start,goal;
Info info[NUM];


//自分のボスのindexを取得しつつ、経路圧縮を行う関数
int get_boss(int id){
	if(boss[id] == id)return id; //自分が代表なら、自分の値を返す
	else{
		return boss[id] = get_boss(boss[id]); //代表でないなら、自分が所属する組織の代表を返しつつ、経路圧縮
	}
}

int is_Same(int x,int y){
	return get_boss(x) == get_boss(y);
}

void unite(int x,int y){
	int boss_x = get_boss(x);
	int boss_y = get_boss(y);

	//既に同じグループなら何もしない
	if(boss_x == boss_y)return;

	//高さが高い方に吸収する
	if(height[x] > height[y]){

		boss[boss_y] = boss_x;

	}else if(height[x] < height[y]){

		boss[boss_x] = boss_y;

	}else{ //height[x] == height[y]

		boss[boss_y] = boss_x;
		height[x]++;
	}
}

void init(){

	for(int i = 0; i < N; i++){

		boss[i] = i;
		height[i] = 0;
	}
}


double norm(Vector a){
	return a.x*a.x+a.y*a.y;
}

double abs(Vector a){
	return sqrt(norm(a));
}

double cross(Vector a,Vector b){
    return a.x*b.y-a.y*b.x;
}

double dot(Vector a,Vector b){
    return a.x*b.x + a.y*b.y;
}

Point calc_minus(Point a,Point b){
    Point ret;

    ret.x = a.x-b.x;
    ret.y = a.y-b.y;

    return ret;
}

int func(double x1,double y1,double x2, double y2, double xp, double yp){
	double naiseki,norm1,norm2,gaiseki;
	norm1 = sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1));
	norm2 = sqrt((xp-x1)*(xp-x1)+(yp-y1)*(yp-y1));
	naiseki = (xp-x1)*(x2-x1)+(yp-y1)*(y2-y1);
	gaiseki = (x2-x1)*(yp-y1)-(xp-x1)*(y2-y1);
	if(gaiseki > EPS){
		return 1;
	}else if(gaiseki < -EPS){
		return -1;
	}
	if(naiseki < -EPS){
		return 2;
	}

	if(norm1 < norm2){
		return -2;
	}
	return 0;
}


//★★直線ではなく、線分の交差判定★★
bool is_Cross(Line a,Line b){

	if(func(a.p[0].x,a.p[0].y,a.p[1].x,a.p[1].y,b.p[0].x,b.p[0].y)*
			func(a.p[0].x,a.p[0].y,a.p[1].x,a.p[1].y,b.p[1].x,b.p[1].y) <= 0 &&
			func(b.p[0].x,b.p[0].y,b.p[1].x,b.p[1].y,a.p[0].x,a.p[0].y)*
			func(b.p[0].x,b.p[0].y,b.p[1].x,b.p[1].y,a.p[1].x,a.p[1].y) <= 0){
		return true;
	}
	return false;
}

double calc_len(Vector a){
    return sqrt(a.x*a.x+a.y*a.y);
}

//★★線分ではなく直線と点の距離★★
double getDistanceLP(Line l,Point p){
    return fabs(cross(calc_minus(l.p[1],l.p[0]),calc_minus(p,l.p[0]))/calc_len(calc_minus(l.p[1],l.p[0])));
}

//★★点と線分の距離★★
double getDistanceSP(Line l,Point p){
	if(dot(calc_minus(l.p[1],l.p[0]),calc_minus(p,l.p[0])) < 0.0)return calc_len(calc_minus(p,l.p[0]));
	if(dot(calc_minus(l.p[0],l.p[1]),calc_minus(p,l.p[1])) < 0.0)return calc_len(calc_minus(p,l.p[1]));
	return getDistanceLP(l,p);
}

//★★線分と線分の距離★★
double getDistance(Line A,Line B){
	if(is_Cross(A,B))return 0.0;
	return min(min(getDistanceSP(A,B.p[0]),getDistanceSP(A,B.p[1])),
			min(getDistanceSP(B,A.p[0]),getDistanceSP(B,A.p[1])));
}

double calc_dist(Point A,Point B){

	return sqrt((A.x-B.x)*(A.x-B.x)+(A.y-B.y)*(A.y-B.y));
}


double calc_dist(Point A,Point B,Vector dir_A,Vector dir_B,double diff_time){

	Point calc_A = A+dir_A*diff_time;
	Point calc_B = B+dir_B*diff_time;

	return calc_dist(calc_A,calc_B);
}

double thirds_search(double left,double right,Point A,Point B,Vector dir_A,Vector dir_B){

	if(fabs(right-left) < EPS){
		return calc_dist(A,B,dir_A,dir_B,(left+right)/2);
	}

	double mid1 = (2.0*left+right)/3.0;
	double mid2 = (1.0*left+2.0*right)/3.0;

	if(calc_dist(A,B,dir_A,dir_B,mid1) > calc_dist(A,B,dir_A,dir_B,mid2)){ //大きい方の外側を捨てる
		return thirds_search(mid1,right,A,B,dir_A,dir_B);
	}else{
		return thirds_search(left,mid2,A,B,dir_A,dir_B);
	}
}

Vector calc_dir(Line A){

	Vector ret;

	double v = abs(A.p[1]-A.p[0])/(A.p[1].arrive_time-A.p[0].arrive_time); //距離/時間 = 速さ

	ret.x = v*((A.p[1].x-A.p[0].x)/abs(A.p[1]-A.p[0]));
	ret.y = v*((A.p[1].y-A.p[0].y)/abs(A.p[1]-A.p[0]));

	return ret;
}

int main(){

	scanf("%d %lf %lf %lf %lf",&N,&start.x,&start.y,&goal.x,&goal.y);

	for(int i = 0; i < N; i++){

		scanf("%lf %d",&info[i].R,&info[i].num_point);

		Polygon polygon;

		for(int k = 0; k < info[i].num_point; k++){

			Point tmp_point;

			scanf("%lf %lf",&tmp_point.x,&tmp_point.y);

			polygon.push_back(tmp_point);
		}

		double sum_dist = 0; //到着時刻を求めるため、まずは総距離を計算

		for(int k = 0; k < info[i].num_point; k++){

			Line tmp_line;

			tmp_line.p[0] = polygon[k];
			tmp_line.p[1] = polygon[(k+1)%info[i].num_point];

			info[i].LINE.push_back(tmp_line);

			sum_dist += calc_dist(tmp_line.p[0],tmp_line.p[1]);
		}

		double current_time = 0;

		for(int k = 0; k < info[i].num_point; k++){

			double tmp_dist = calc_dist(info[i].LINE[k].p[1],info[i].LINE[k].p[0]);

			info[i].LINE[k].p[0].arrive_time = current_time;
			info[i].LINE[k].p[1].arrive_time = current_time+UNIT_TIME*(tmp_dist/sum_dist);

			current_time = info[i].LINE[k].p[1].arrive_time;
		}
	}

	start_index = N;
	goal_index = N+1;

	N += 2;
	init();

	//スタートと、スポットライトの関係を調べる
	for(int i = 0; i <= N-3; i++){

		double min_dist = BIG_NUM;

		for(int k = 0; k < info[i].num_point; k++){

			double tmp_dist = getDistanceSP(info[i].LINE[k],start);

			min_dist = min(min_dist,tmp_dist);
		}

		if(min_dist+EPS < info[i].R){

			unite(i,start_index);
		}
	}

	//ゴールと、スポットライトの関係を調べる
	for(int i = 0; i <= N-3; i++){

		double min_dist = BIG_NUM;

		for(int k = 0; k < info[i].num_point; k++){

			double tmp_dist = getDistanceSP(info[i].LINE[k],goal);

			min_dist = min(min_dist,tmp_dist);
		}

		if(min_dist+EPS < info[i].R){

			unite(i,goal_index);
		}
	}

	//スポットライト同士の接続関係を調べる
	for(int i = 0; i <= N-4; i++){
		for(int k = i+1; k <= N-3; k++){

			double min_dist = BIG_NUM;

			for(int a = 0; a < info[i].num_point; a++){
				for(int b = 0; b < info[k].num_point; b++){

					if(getDistance(info[i].LINE[a],info[k].LINE[b]) >= info[i].R+info[k].R)continue; //交差不可能なのでSKIP

					double L = max(info[i].LINE[a].p[0].arrive_time,info[k].LINE[b].p[0].arrive_time);
					double	R = min(info[i].LINE[a].p[1].arrive_time,info[k].LINE[b].p[1].arrive_time);

					if(L >= R){
						continue; //時間が交差しないのでSKIP
					}

					Point A = info[i].LINE[a].p[0];
					Point B = info[k].LINE[b].p[0];

					Vector dir_A = calc_dir(info[i].LINE[a]);
					Vector dir_B = calc_dir(info[k].LINE[b]);

					double tmp_dist = thirds_search(0,R-L,A,B,dir_A,dir_B);

					min_dist = min(min_dist,tmp_dist);
				}
			}

			if(min_dist+EPS < info[i].R+info[k].R){

				unite(i,k);
			}
		}
	}


	if(is_Same(start_index,goal_index)){

		printf("Yes\n");

	}else{

		printf("No\n");
	}

	return 0;
}




Measured memory_bytes: 3332