QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#686535#685. Y-Shaped KnifeCrysflyAC ✓181ms10584kbC++143.3kb2024-10-29 14:06:012024-10-29 14:06:03

Judging History

你现在查看的是最新测评结果

  • [2024-10-29 14:06:03]
  • 评测
  • 测评结果:AC
  • 用时:181ms
  • 内存:10584kb
  • [2024-10-29 14:06:01]
  • 提交

answer

// what is matter? never mind. 
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
//#pragma GCC target("sse,sse2,sse3,sse4,popcnt,abm,mmx,avx,avx2")
#include<bits/stdc++.h>
#define For(i,a,b) for(int i=(a);i<=(b);++i)
#define Rep(i,a,b) for(int i=(a);i>=(b);--i)
#define ll long long
#define ull unsigned long long
//#define int long long
#define SZ(x) ((int)((x).size()))
#define ALL(x) (x).begin(),(x).end()
using namespace std;
inline int read()
{
	char c=getchar();int x=0;bool f=0;
	for(;!isdigit(c);c=getchar())f^=!(c^45);
	for(;isdigit(c);c=getchar())x=(x<<1)+(x<<3)+(c^48);
	return f?-x:x;
}

#define fi first
#define se second
#define pb push_back
#define mkp make_pair
typedef pair<int,int>pii;
typedef vector<int>vi;

typedef double db;
const db eps=1e-8,pi=3.14159265358979323846;
int sgn(db x){return x<-eps?-1:x>eps;}
int cmp(db a,db b){return sgn(a-b);}

struct P{
	db x,y;
	P(db x=0,db y=0):x(x),y(y){}
	P&operator +=(P o){return x+=o.x,y+=o.y,*this;}
	P&operator -=(P o){return x-=o.x,y-=o.y,*this;}
	P&operator *=(db o){return x*=o,y*=o,*this;}
	P&operator /=(db o){return x/=o,y/=o,*this;}
	friend P operator +(P a,P b){return a+=b;}
	friend P operator -(P a,P b){return a-=b;}
	friend P operator *(P a,db b){return a*=b;}
	friend P operator /(P a,db b){return a/=b;}
	friend bool operator <(P a,P b){return fabs(a.x-b.x)<eps?a.y<b.y:a.x<b.x;}
	friend bool operator ==(P a,P b){return cmp(a.x,b.x)==0 && cmp(a.y,b.y)==0;}
	friend bool operator !=(P a,P b){return !(a==b);}
	friend db operator %(P a,P b){return a.x*b.x+a.y*b.y;} // dot
	friend db operator *(P a,P b){return a.x*b.y-a.y*b.x;} // cross
	
	P rot(db o){
		db s=sin(o),c=cos(o);
		return P(x*c-y*s,x*s+y*c);
	}
	P rot90(){return P(-y,x);}
	db ang(){return atan2(y,x);}
	db len(){return sqrt(x*x+y*y);}
	db len2(){return x*x+y*y;}
	
	int half(){return sgn(y)==1||(sgn(y)==0&&sgn(x)>=0);}
	P unit(){return ((*this))/len();}
	
	void read(){cin>>x>>y;}
	void out(){cout<<"("<<x<<","<<y<<")"<<endl;}
};
bool cmp_dir(P a,P b){
	if(a.half()!=b.half())return a.half()<b.half();
	return sgn(a*b)>0;
}

db dis(P a,P b){return (a-b).len();}
db cross(P a,P b,P c){
	// (a->b)*(a->c)
	return (b.x-a.x)*(c.y-a.y)-(b.y-a.y)*(c.x-a.x);
}
int cmp3(P a,P b,P c){
	return sgn(cross(a,b,c));
}

#define maxn 200005
#define inf 0x3f3f3f3f

int n;
db rang;
P a[maxn];
mt19937_64 rnd(time(0));

pair<db,int> p[maxn];
db S=1.0/sqrt(3);
int chk(db mid)
{
//	cout<<"chk "<<mid<<"\n";
	For(i,1,n){
		if(a[i].x<mid) p[i]=mkp(a[i].y-(mid-a[i].x)*S,-1);
		else p[i]=mkp(a[i].y-(a[i].x-mid)*S,1);
	}
	sort(p+1,p+n+1);
//	For(i,1,n) cout<<p[i].fi<<" "<<p[i].se<<"\n";
	int pos=n/3*2;
//	nth_element(p+1,p+pos+1,p+n+1);
//	nth_element(p+pos+1,p+pos+2,p+n+1);
	int sum=0;
	For(i,1,pos)sum+=p[i].se;
	if(sum!=0)return sum;
	puts("Yes");
	P tmp=P(mid,(p[pos].fi+p[pos+1].fi)/2);
	tmp=tmp.rot(rang);
	printf("%.12lf %.12lf %.12lf\n",tmp.x,tmp.y,rang);
	exit(0);
}

signed main()
{
	n=read();
	rang=1.0*rnd()/ULLONG_MAX*(2*pi/3);
//	rang=0;
	For(i,1,n)a[i].x=read(),a[i].y=read(),a[i]=a[i].rot(-rang);
//	For(i,1,n)cout<<a[i].x<<" "<<a[i].y<<"\n";
	//puts("---------");
	if(n%3)puts("No"),exit(0);
	db l=-1e7,r=1e7+114514;
	while(1){
		db mid=(l+r)/2;
		int ans=chk(mid);
		if(ans>0) l=mid;
		else r=mid;
	}
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 9132kb

input:

9
3 -2
-4 6
0 -7
-5 -6
5 1
1 6
-5 0
-3 -7
-4 2

output:

Yes
-3.348653996530 -1.153965619989 0.666242338630

result:

ok Answer is found

Test #2:

score: 0
Accepted
time: 1ms
memory: 8704kb

input:

4
568817 -532765
20585 -88674
54620 539081
866306 368203

output:

No

result:

ok No answer

Test #3:

score: 0
Accepted
time: 0ms
memory: 8208kb

input:

3
-249533 -739397
681290 -376732
-942721 799628

output:

Yes
-16308.779968656774 113388.394119609555 0.666242338630

result:

ok Answer is found

Test #4:

score: 0
Accepted
time: 0ms
memory: 8604kb

input:

6
303183 -370732
578892 -257778
328641 25259
660987 62586
-949298 876989
-727181 -390642

output:

Yes
251608.834595440276 -227406.037648856989 0.666242338630

result:

ok Answer is found

Test #5:

score: 0
Accepted
time: 1ms
memory: 9236kb

input:

9
302505 -89769
578921 395830
-909766 794824
-13472 -33592
837847 825866
807789 -644604
744094 -411512
-358771 287832
173441 563062

output:

Yes
226181.465801439626 186334.526260537794 0.666242338630

result:

ok Answer is found

Test #6:

score: 0
Accepted
time: 1ms
memory: 7568kb

input:

12
-320242 -292874
131803 883484
-757350 840492
684942 -214670
-119683 -815491
-306255 148032
-380136 -770001
-755821 -24754
287075 -924350
650253 -116847
49079 904406
-401048 -482856

output:

Yes
-355099.754492173844 -218458.696101044654 0.666242338630

result:

ok Answer is found

Test #7:

score: 0
Accepted
time: 0ms
memory: 9160kb

input:

15
-954613 -90307
682160 -640829
-459503 521186
372656 -72950
-372296 372397
-208372 596601
-753367 699172
997515 -835228
-7553 367924
-272374 462113
-841743 -231646
-892364 984763
-900507 663513
-780605 -498703
89348 -171558

output:

Yes
-275120.811833244865 442600.415052384196 0.666242338630

result:

ok Answer is found

Test #8:

score: 0
Accepted
time: 0ms
memory: 8688kb

input:

90
-612929 285792
-19561 546583
-639275 -350337
799407 -879779
-43931 -641532
696565 -442617
9217 148356
235427 -401407
867598 158249
998488 -484957
976428 844546
220878 864532
148005 456856
-720917 -426254
566450 -197779
-375805 244999
-610641 225683
245057 -354612
-918669 -124372
344909 501051
943...

output:

Yes
-18992.617259102961 -201028.269720407494 0.666242338630

result:

ok Answer is found

Test #9:

score: 0
Accepted
time: 1ms
memory: 7872kb

input:

102
703172 -902382
166116 -137491
-787848 -847731
461115 -197036
-887051 382441
724936 578216
-881935 -541390
20570 563876
-273641 120215
302538 86089
-201359 -651737
-323457 431538
-18254 249011
-886355 -985155
103593 -501845
926942 -514332
-859052 -232289
-407112 -393917
479637 -264919
-951386 312...

output:

Yes
-77095.282355364063 87414.632509669682 0.666242338630

result:

ok Answer is found

Test #10:

score: 0
Accepted
time: 1ms
memory: 8416kb

input:

201
663725 -492020
591705 581345
-118339 243511
-565704 72686
-741424 419466
437247 -783537
249861 704337
-896935 7304
78089 895958
478112 -416512
-919829 -58995
184146 -341929
-699105 -66226
-29671 -425147
-762888 561875
582909 -935883
236267 -315536
33248 -613691
325560 842947
-540948 33719
430588...

output:

Yes
38832.090029356346 -32236.209061368896 0.666242338630

result:

ok Answer is found

Test #11:

score: 0
Accepted
time: 0ms
memory: 8748kb

input:

300
475511 68475
-180117 828757
-773621 255111
444934 -473463
935502 -650554
95466 -239793
252196 620342
-694496 -923056
-372597 -292680
-869227 904582
507988 -241895
-227255 -294402
-944712 524888
364483 650890
886382 -367145
-413100 87857
-518189 -231234
402554 -17402
-226340 -310233
-869500 -9161...

output:

Yes
-25743.278062770900 73245.116790029584 0.666242338630

result:

ok Answer is found

Test #12:

score: 0
Accepted
time: 0ms
memory: 8268kb

input:

402
-878876 -548660
-943681 -862651
950987 634649
562406 -832920
-916301 -112118
-261500 628797
-370085 -764392
272803 15041
130199 686407
-622556 -984304
33707 313799
-514921 835623
760169 -991536
-200678 710727
114518 939188
319859 454798
-125633 -947592
473610 126528
112927 -315178
206732 -907686...

output:

Yes
-4577.826750180150 -19230.140431934757 0.666242338630

result:

ok Answer is found

Test #13:

score: 0
Accepted
time: 1ms
memory: 8768kb

input:

501
-324676 461718
-745592 534607
-663500 167782
-706073 381621
-634673 192683
-881171 485739
-746219 235719
398001 -362272
-747958 145384
-295364 -923980
244314 606072
37191 -989606
697251 -28583
-191247 526184
-738009 404697
314840 -202704
-213746 -571320
94301 381339
454551 806139
-981612 580215
...

output:

Yes
-1110.623330561699 -37048.940718597201 0.666242338630

result:

ok Answer is found

Test #14:

score: 0
Accepted
time: 0ms
memory: 7540kb

input:

600
-750691 62203
157089 -159472
-86294 -740665
788032 223504
533266 -556786
-344620 -598332
966532 -898609
6239 -52969
-274058 -469807
-259783 455365
742219 -111513
799086 -20503
-520643 -275854
387831 510239
-488155 -955442
-358811 -458125
701162 -278923
624099 490570
-171529 37489
-498049 -283263...

output:

Yes
57283.040709493573 -2165.251762009713 0.666242338630

result:

ok Answer is found

Test #15:

score: 0
Accepted
time: 0ms
memory: 9088kb

input:

702
-868961 520520
-987170 -353837
532839 -617153
-761583 556933
927846 66237
-416377 586191
-920400 125338
833838 920325
-606657 -577693
-665139 292370
-810833 270249
-113581 -923151
608137 -875241
-920722 -896210
-321479 -251950
-564649 -60708
980194 908971
180112 947031
-85980 -754599
-660518 535...

output:

Yes
33339.865763380039 -13331.388517586700 0.666242338630

result:

ok Answer is found

Test #16:

score: 0
Accepted
time: 2ms
memory: 7480kb

input:

801
455327 143325
892532 -692761
416434 -754711
-4458 -114828
485238 -734953
-477050 -944180
-256382 -42088
239808 861273
714199 -891958
150869 -847768
747357 -518122
-250638 342590
-882172 -582791
119795 -878996
-428416 -243577
-897704 -695992
-743890 735566
469195 477919
-495109 -337768
797215 968...

output:

Yes
42208.604197925437 1211.200550327394 0.666242338630

result:

ok Answer is found

Test #17:

score: 0
Accepted
time: 2ms
memory: 8660kb

input:

900
-802763 15
364251 -486580
-168934 230843
-216661 -397179
942920 -591485
163530 -95309
-174388 -934115
890603 -894157
-708749 986248
-580655 442726
424887 -252442
303713 400868
-275863 -293050
-740874 -672671
312844 348981
122478 -522997
78802 380572
749700 869501
681587 -900963
159018 -41354
970...

output:

Yes
50401.554654598243 -31557.790729485492 0.666242338630

result:

ok Answer is found

Test #18:

score: 0
Accepted
time: 2ms
memory: 7472kb

input:

501
165 -48
-261 -134
-499 -20
-263 -112
-226 -87
-169 441
-82 321
-41 240
55 92
-147 157
-307 178
481 -176
205 -359
-317 -62
-380 -28
252 253
289 -399
-9 367
331 420
448 -329
-166 390
232 169
345 142
12 312
-187 -362
-381 330
-358 152
152 -261
-293 90
-463 212
316 -69
354 486
-351 -282
386 477
483 ...

output:

Yes
15.817888417465 -14.622192827928 0.666242338630

result:

ok Answer is found

Test #19:

score: 0
Accepted
time: 0ms
memory: 9300kb

input:

1002
153 -705
-522 -3
772 -160
844 -32
237 -834
37 138
-103 28
-925 231
21 -9
75 523
-207 -211
161 441
-963 878
-68 517
-894 -80
744 275
-772 -457
432 -340
348 -962
657 33
-15 193
-930 -488
-515 55
-406 -173
188 872
49 -412
641 -183
325 -924
-735 133
28 -806
499 -316
-564 -613
751 59
-347 482
-737 2...

output:

Yes
45.800482336598 44.961225542030 0.666242338630

result:

ok Answer is found

Test #20:

score: 0
Accepted
time: 1ms
memory: 8520kb

input:

102
-999568 -29414
-990929 -134389
-988114 -153726
-948613 -316439
-897857 -440288
-892796 -450462
-865109 -501584
-814796 -579749
-779294 -626660
-741353 -671117
-668573 -743647
-663875 -747844
-634594 -772847
-607834 -794065
-603075 -797685
-599136 -800648
-524226 -851580
-431533 -902098
-405424 -...

output:

Yes
252433.065694875317 -284074.813540302857 0.666242338630

result:

ok Answer is found

Test #21:

score: 0
Accepted
time: 2ms
memory: 7884kb

input:

501
-999993 -3968
-999980 -6416
-999901 -14126
-999476 -32390
-998749 -50021
-998419 -56226
-996970 -77795
-995760 -91994
-995454 -95249
-995195 -97920
-993158 -116786
-989754 -142788
-987088 -160183
-983437 -181251
-983084 -183157
-979497 -201462
-971353 -237646
-967951 -251142
-961833 -273639
-960...

output:

Yes
36275.818379346099 -56794.772746167793 0.666242338630

result:

ok Answer is found

Test #22:

score: 0
Accepted
time: 2ms
memory: 9052kb

input:

1002
-1000000 -1315
-999991 -4391
-999987 -5243
-999892 -14702
-999589 -28682
-999334 -36508
-999257 -38545
-999154 -41138
-999025 -44167
-998651 -51944
-997881 -65079
-997389 -72226
-996833 -79524
-996682 -81402
-996189 -87231
-995444 -95356
-993746 -111669
-992940 -118625
-992566 -121710
-991824 -...

output:

Yes
52979.554250491121 29225.680394757295 0.666242338630

result:

ok Answer is found

Test #23:

score: 0
Accepted
time: 4ms
memory: 7704kb

input:

5001
-999999 -1886
-999998 -2370
-999994 -3669
-999992 -4221
-999990 -4669
-999975 -7206
-999973 -7473
-999951 -9997
-999948 -10293
-999940 -11036
-999936 -11386
-999928 -12077
-999920 -12714
-999895 -14559
-999883 -15362
-999851 -17319
-999841 -17888
-999828 -18591
-999777 -21165
-999772 -21400
-99...

output:

Yes
21934.248912891715 35939.408458423568 0.666242338630

result:

ok Answer is found

Test #24:

score: 0
Accepted
time: 7ms
memory: 8788kb

input:

9090
-1000000 -1356
-999998 -2386
-999994 -3692
-999988 -5098
-999984 -5825
-999979 -6623
-999976 -7064
-999971 -7744
-999968 -8124
-999960 -9053
-999954 -9679
-999948 -10294
-999933 -11642
-999916 -13023
-999909 -13561
-999908 -13636
-999896 -14490
-999892 -14760
-999888 -15029
-999879 -15611
-9998...

output:

Yes
-41013.184592177022 14452.513001447533 0.666242338630

result:

ok Answer is found

Test #25:

score: 0
Accepted
time: 5ms
memory: 7872kb

input:

10002
-1000000 -1249
-999999 -1942
-999998 -2418
-999996 -3157
-999995 -3434
-999992 -4236
-999989 -4891
-999986 -5473
-999984 -5811
-999981 -6317
-999978 -6777
-999977 -6915
-999973 -7463
-999968 -8110
-999962 -8826
-999957 -9368
-999950 -10099
-999942 -10850
-999941 -10942
-999936 -11393
-999931 -...

output:

Yes
-9379.639316673334 9473.587725463902 0.666242338630

result:

ok Answer is found

Test #26:

score: 0
Accepted
time: 0ms
memory: 8492kb

input:

102
36 64
76 105
99 27
3 26
69 22
97 3
38 29
46 37
37 61
12 47
88 40
81 104
90 41
66 3
82 104
105 57
29 36
26 25
40 96
14 96
34 92
56 53
91 107
45 83
71 35
87 105
15 77
64 27
60 54
49 52
25 36
21 8
23 80
18 64
107 53
24 18
59 70
79 17
47 71
70 43
104 70
22 4
4 108
80 75
72 107
16 29
11 88
65 84
52 2...

output:

Yes
56.777086521297 53.307514821055 0.666242338630

result:

ok Answer is found

Test #27:

score: 0
Accepted
time: 0ms
memory: 8804kb

input:

201
141 91
146 18
153 171
150 75
208 118
164 175
27 95
142 12
12 71
157 159
102 14
184 113
182 46
20 195
160 45
129 48
130 89
197 101
174 11
106 143
16 2
200 53
178 3
24 17
169 7
203 126
63 130
133 152
109 82
54 123
156 177
186 140
78 100
159 93
167 62
170 70
9 176
181 103
195 83
154 183
125 206
15 ...

output:

Yes
110.303950071021 112.283078924079 0.666242338630

result:

ok Answer is found

Test #28:

score: 0
Accepted
time: 1ms
memory: 7420kb

input:

501
397 366
404 395
131 474
242 30
433 77
372 463
220 161
339 320
470 473
124 191
266 502
324 493
303 130
278 76
287 410
390 266
41 149
401 381
422 277
294 405
165 79
252 376
21 301
362 162
359 181
352 486
142 262
486 385
350 324
315 467
416 259
145 324
347 65
334 431
273 207
50 104
110 418
197 360
...

output:

Yes
256.410536044767 271.733031942249 0.666242338630

result:

ok Answer is found

Test #29:

score: 0
Accepted
time: 4ms
memory: 7920kb

input:

3000
675727 911555
473898 40961
667383 956519
450938 510513
167598 51780
118735 518332
942982 841354
944088 281751
110662 437700
231115 696254
417562 223094
228824 221184
674085 299789
468487 777606
693865 157943
402323 944267
728534 729201
624992 734731
672538 895181
346112 268797
949447 167883
123...

output:

Yes
536822.586039427202 497375.005652740481 0.666242338630

result:

ok Answer is found

Test #30:

score: 0
Accepted
time: 12ms
memory: 7696kb

input:

10002
280820 941491
151581 644081
754426 703726
982931 618132
421226 926332
906885 21525
127667 836192
206454 777694
395569 489422
135984 607283
981026 504973
129685 922127
965877 355220
208903 313009
872817 475707
330150 397641
110618 34073
984146 472300
164432 746278
598628 721439
526605 582300
84...

output:

Yes
525442.773223827593 492606.618774076051 0.666242338630

result:

ok Answer is found

Test #31:

score: 0
Accepted
time: 34ms
memory: 9332kb

input:

30000
673183 869707
979009 889942
574981 798326
713768 234030
373684 22931
385641 931312
513687 638595
52983 700867
703410 391149
81561 996954
324536 383472
23462 202202
405412 488475
446063 779830
22303 192701
552065 927048
332747 529364
456323 954083
58907 465826
629749 621099
103053 904095
451205...

output:

Yes
514791.738015500945 493863.761004653177 0.666242338630

result:

ok Answer is found

Test #32:

score: 0
Accepted
time: 52ms
memory: 10428kb

input:

60000
445754 705919
338113 334576
283686 515567
940773 377032
435366 104007
891809 621962
480065 134866
670263 220367
656532 543891
907350 455579
202048 628490
738842 871122
4471 302282
266435 686221
493971 870067
195592 111283
755325 157335
245909 204913
866211 195482
439908 105480
417683 435865
52...

output:

Yes
498117.989186773542 478618.385155746306 1.104522277399

result:

ok Answer is found

Test #33:

score: 0
Accepted
time: 133ms
memory: 10508kb

input:

90000
822527 719833
981777 663259
930823 486465
540221 107097
212314 395098
214545 235264
497000 485162
592137 110210
974932 965450
988589 946981
910485 229070
186873 48121
754995 947892
113513 54800
295163 942958
706040 892360
239891 997888
211452 149447
42791 478936
717283 873991
914067 93335
4647...

output:

Yes
497435.036190568819 474420.105969735072 1.104522277399

result:

ok Answer is found

Test #34:

score: 0
Accepted
time: 129ms
memory: 10580kb

input:

99999
228302 77323
8648 402886
269730 198717
296865 92676
640605 785794
502743 525646
215345 756219
435197 401620
310399 10133
926340 732191
817452 45073
686901 306610
443539 378760
721760 467233
218198 702612
531876 292095
134892 278567
27903 947409
801073 249461
625929 578380
248218 316520
251185 ...

output:

Yes
496805.501376112574 478677.638629477238 1.104522277399

result:

ok Answer is found

Test #35:

score: 0
Accepted
time: 149ms
memory: 10328kb

input:

99996
117358 147751
878392 415194
773010 992920
457051 874577
380787 291614
536210 64991
970655 129645
314935 713375
13590 203121
236654 886719
832745 892224
208925 744440
481895 747767
765632 359718
426027 56191
136478 985358
623275 89138
396843 919629
737788 470318
543564 890436
899356 479104
8050...

output:

Yes
495798.386785742943 479732.123806638527 1.104522277399

result:

ok Answer is found

Test #36:

score: 0
Accepted
time: 135ms
memory: 10584kb

input:

99993
965960 602336
906566 474269
866513 500312
632097 467772
692615 705771
411331 135920
998552 160188
590112 406822
982759 438462
426617 364420
787662 875650
302993 354896
760925 338165
425782 220421
356388 95427
39004 710363
250146 962036
663436 514081
954995 662745
775189 12188
548201 787771
446...

output:

Yes
495214.797054014751 476686.446486763132 1.104522277399

result:

ok Answer is found

Test #37:

score: 0
Accepted
time: 169ms
memory: 10504kb

input:

99990
464143 205395
928326 129624
810224 755682
50725 113866
332692 3933
497774 248847
862542 441396
215870 351780
260669 235453
702706 930588
871116 263355
982285 286391
780029 83257
567295 260569
580031 892744
658436 448908
769119 540975
635985 195841
466550 702537
583306 600758
323332 692300
3751...

output:

Yes
493458.340835069946 476503.400664796063 1.104522277399

result:

ok Answer is found

Test #38:

score: 0
Accepted
time: 118ms
memory: 10512kb

input:

99900
428277 201600
208111 400347
519639 971615
228738 43010
49026 996943
593636 396507
97234 614780
891065 693200
456532 495193
432663 831927
834271 578299
847391 396398
740836 539633
562933 579470
82102 651086
538700 33901
840673 366254
560263 751652
660307 519093
104081 898720
424199 261462
95826...

output:

Yes
490699.545692430984 517245.796661621600 1.927910968492

result:

ok Answer is found

Test #39:

score: 0
Accepted
time: 155ms
memory: 10412kb

input:

99903
883864 870834
394270 317174
760112 383987
916314 536753
826964 195344
180334 633104
324208 229984
381809 857708
852077 14828
241141 49536
393211 768768
56729 467525
737262 405760
935885 612389
851541 698764
624893 718658
900010 706210
937588 988054
941136 493402
614523 324092
85028 309496
6533...

output:

Yes
493993.261763886432 518131.775633783836 1.927910968492

result:

ok Answer is found

Test #40:

score: 0
Accepted
time: 157ms
memory: 10396kb

input:

99906
710348 433242
724161 650197
723524 342403
445856 837675
619156 353645
589814 816172
794609 572074
42227 208612
934339 751423
828272 696166
700597 154217
198202 480801
28709 265306
154677 831998
57454 975828
301766 313097
986271 283070
240296 889532
753982 781893
399995 430247
793679 521402
968...

output:

Yes
492875.026904081518 517868.106801360729 1.927910968492

result:

ok Answer is found

Test #41:

score: 0
Accepted
time: 152ms
memory: 10576kb

input:

99909
941336 981226
542691 866656
193790 394875
516291 693668
914572 976103
941017 65075
797948 104894
89481 835205
435264 432542
627390 992018
137670 902625
596080 680898
432125 548469
216033 424881
891766 430194
988766 499260
969915 489714
804576 168072
690130 535479
593039 80108
564323 427949
705...

output:

Yes
492515.303051608789 520436.515618113219 1.927910968492

result:

ok Answer is found

Test #42:

score: 0
Accepted
time: 161ms
memory: 10332kb

input:

99999
476667 91325
321993 31880
172107 48003
273276 59499
601218 97797
728136 19112
142164 11400
513810 8699
421722 36842
152730 56074
829584 17705
416160 77357
444195 49495
101304 82719
625302 33714
146007 56764
290466 45537
582462 48132
857871 15157
670266 16677
120069 67017
237276 72172
504729 89...

output:

Yes
393476.229909253889 -26716.210303770102 1.927910968492

result:

ok Answer is found

Test #43:

score: 0
Accepted
time: 159ms
memory: 10480kb

input:

99999
7918 477126
70671 640143
97858 310374
13380 106236
29819 582381
62863 751293
77470 663777
62506 265437
16662 751599
63765 612360
30877 810090
58084 158247
32002 394236
52376 96687
60117 375786
50287 670950
45798 437823
70067 636327
61705 728190
87673 796959
26677 601704
83911 778437
14060 4584...

output:

Yes
109524.660069405945 356500.918954231951 1.286453786864

result:

ok Answer is found

Test #44:

score: 0
Accepted
time: 130ms
memory: 10396kb

input:

99999
737040 99000
625280 45623
409632 17890
133152 27766
80264 59342
526136 66380
707840 51032
696208 31862
494448 74305
549280 42751
13464 50726
281088 34170
485744 79676
90832 95937
160192 10785
391496 44235
562280 83118
508040 41231
652568 60042
45928 88569
167224 79451
145176 83133
132480 96630...

output:

Yes
329234.094369129511 109361.436422211540 1.286453786864

result:

ok Answer is found

Test #45:

score: 0
Accepted
time: 124ms
memory: 10332kb

input:

99999
47624 781944
11414 704544
77710 478192
10552 726808
60455 293784
76342 518792
22666 449512
71861 592000
4899 408248
28679 638064
6104 764568
34609 388600
33943 221736
93744 160912
39475 164528
14071 230848
37002 176992
81063 284872
8044 531032
22117 663976
25314 708424
8771 69312
66226 678328
...

output:

Yes
103008.655057262833 317573.089627284789 1.286453786864

result:

ok Answer is found

Test #46:

score: 0
Accepted
time: 181ms
memory: 10292kb

input:

99999
101612 99017
234822 66
409094 9941
270137 10375
80024 79762
359674 7034
212961 41002
124663 98560
503118 36110
270648 88634
614432 55239
644693 93675
447580 95519
47089 57297
82012 74175
253015 5924
52794 88014
551656 53848
603764 34644
321146 20700
659512 57573
637301 66925
615958 3384
403802...

output:

Yes
288139.845760035387 102133.176876284066 1.286453786864

result:

ok Answer is found

Test #47:

score: 0
Accepted
time: 175ms
memory: 10500kb

input:

99999
28452 630525
24418 490406
25146 596666
48358 239050
76365 304227
63389 357532
27304 346318
22469 527058
65901 692762
15152 649313
41630 526260
12596 342265
17561 624029
85985 433776
93358 81207
46381 343861
53283 582855
83914 161063
32605 645568
71940 10661
35294 155932
31996 589736
760 628754...

output:

Yes
96051.056460909909 277523.374260933371 1.286453786864

result:

ok Answer is found

Test #48:

score: 0
Accepted
time: 0ms
memory: 8676kb

input:

3
0 1000000
-1 0
0 -1000000

output:

Yes
147388.401527213951 16576.252708880762 1.286453786864

result:

ok Answer is found

Test #49:

score: 0
Accepted
time: 1ms
memory: 8612kb

input:

3
-1000000 0
0 1
1000000 0

output:

Yes
-335131.459621563146 157598.398711452581 1.286453786864

result:

ok Answer is found

Test #50:

score: 0
Accepted
time: 1ms
memory: 9072kb

input:

3
1000000 1000000
1000000 -1000000
-1000000 1000000

output:

Yes
-19201.666924759211 78560.451115412783 1.026361796748

result:

ok Answer is found

Test #51:

score: 0
Accepted
time: 1ms
memory: 8060kb

input:

6
-400000 -2
-800000 1
800000 5
-200000 -1
-400000 -5
-200000 -4

output:

Yes
-295189.596404162177 57631.275308775876 1.026361796748

result:

ok Answer is found

Test #52:

score: 0
Accepted
time: 0ms
memory: 8136kb

input:

6
-1 -400000
5 400000
5 -1000000
3 400000
-3 1000000
-2 600000

output:

Yes
-8911.614817629164 72330.095645230933 1.026361796748

result:

ok Answer is found

Test #53:

score: 0
Accepted
time: 1ms
memory: 7500kb

input:

6
760000 2
950000 -1
-570000 -2
-570000 0
570000 3
190000 -1

output:

Yes
285506.034104285878 261477.155680474301 1.026361796748

result:

ok Answer is found

Test #54:

score: 0
Accepted
time: 0ms
memory: 7968kb

input:

6
-5 380000
2 -760000
-1 -380000
3 190000
1 950000
4 0

output:

Yes
-12049.542637542778 -293179.162056963542 1.026361796748

result:

ok Answer is found

Test #55:

score: 0
Accepted
time: 1ms
memory: 7716kb

input:

12
1000000 -10
-100000 3
500000 4
300000 -1
800000 -9
-500000 -5
-200000 -1
400000 2
-100000 8
300000 7
400000 -5
-400000 1

output:

Yes
162017.220232116000 144087.605373246945 1.026361796748

result:

ok Answer is found

Test #56:

score: 0
Accepted
time: 1ms
memory: 8396kb

input:

12
5 -400000
-2 -500000
-8 -700000
-7 -1000000
10 600000
-8 1000000
4 -500000
-10 500000
8 700000
-6 -600000
-7 500000
6 200000

output:

Yes
-20587.514649167395 -487534.991056822822 1.026361796748

result:

ok Answer is found

Test #57:

score: 0
Accepted
time: 0ms
memory: 8488kb

input:

3
400000 -2
-1000000 1
400000 1

output:

Yes
66836.425206350163 201722.675541956443 1.026361796748

result:

ok Answer is found

Test #58:

score: 0
Accepted
time: 0ms
memory: 7788kb

input:

3
-2 -1000000
-3 600000
-4 400000

output:

Yes
-8915.564977177102 72332.487362774380 1.026361796748

result:

ok Answer is found

Test #59:

score: 0
Accepted
time: 1ms
memory: 8844kb

input:

3
480000 -6
-360000 0
-600000 -4

output:

Yes
-170519.966799825314 170179.695367051230 1.026361796748

result:

ok Answer is found

Test #60:

score: 0
Accepted
time: 1ms
memory: 7916kb

input:

3
-1 240000
0 -360000
2 480000

output:

Yes
-6030.538483216955 70585.679823694052 1.026361796748

result:

ok Answer is found

Test #61:

score: 0
Accepted
time: 1ms
memory: 8320kb

input:

60
88 -882472
88 468308
-80 792386
91 733336
92 -393441
-86 -893188
-94 -53354
97 204623
-80 642415
94 -888386
-88 836347
82 657406
80 71931
-91 405004
93 -325985
-81 537273
86 716540
-87 -953717
-99 75767
-87 354676
-90 -592071
-97 -936438
-96 -12866
98 742749
91 -121280
100 561759
86 87404
82 -435...

output:

Yes
-12595.328287997836 -384701.000806696014 1.026361796748

result:

ok Answer is found

Test #62:

score: 0
Accepted
time: 0ms
memory: 8948kb

input:

30
90 -764842
80 652918
-86 -820270
-97 -848705
99 761462
92 -219171
-100 759488
84 -155485
89 -726749
94 -567396
-82 255879
91 -12461
-92 447654
88 -502795
-80 -990621
-94 -444715
85 -357541
96 -602996
-93 -944659
94 858526
-92 181938
-99 -981580
-100 599091
-80 151195
95 -221396
88 -110085
-91 -54...

output:

Yes
-10687.572186235862 -546597.617638595751 1.026361796748

result:

ok Answer is found

Test #63:

score: 0
Accepted
time: 1ms
memory: 7572kb

input:

60
-826694 -82
-391187 96
-714241 91
167961 -98
81722 89
782694 -88
-583673 96
348028 -85
494848 84
-860643 93
629129 -82
541186 -96
524958 94
-423632 97
82044 -89
-319657 90
650783 -98
-417368 89
-917466 -83
224351 98
-550070 81
57559 -85
487592 82
-619539 -92
-804921 -91
-303452 98
-225646 -90
-60...

output:

Yes
-55061.408293001485 192124.877409345238 1.026361796748

result:

ok Answer is found

Test #64:

score: 0
Accepted
time: 1ms
memory: 8584kb

input:

30
-56174 -89
469041 99
644476 -86
-908119 -82
637700 99
5810 -95
218076 88
-552563 89
-941139 86
702169 -98
485890 -94
539586 96
-454324 -92
362734 -97
385759 91
-185164 -89
101947 82
209340 95
984506 91
293636 -90
948095 -95
-348190 -87
-665168 -88
374228 85
902006 -94
664691 80
477993 89
364665 -...

output:

Yes
272395.696996953338 120155.135848552804 1.026361796748

result:

ok Answer is found

Test #65:

score: 0
Accepted
time: 1ms
memory: 7852kb

input:

30
946906 5
384658 -5
-898682 7
110233 9
-401208 -5
564727 -10
-243106 -1
-802891 9
-802369 0
-924671 5
-963258 -2
-406199 -2
-767502 -10
-134769 4
462342 2
620506 -9
-230391 6
-739137 -3
-183447 -1
931884 -7
34978 -3
-811533 -8
429800 10
831044 -9
613242 1
-872840 1
-73308 -8
-928996 -7
-703540 3
-...

output:

Yes
-305261.347793952853 228798.977542179433 1.026361796748

result:

ok Answer is found

Test #66:

score: 0
Accepted
time: 1ms
memory: 7696kb

input:

30
-10 -51566
9 -604223
1 -122331
7 240266
8 -233057
9 576948
7 387962
1 -83466
-5 -513691
-4 592650
3 -65330
-2 648485
4 -835660
0 -181544
-7 -834851
-9 701124
-4 -864518
-6 916098
-2 -889152
3 969454
-8 -883119
2 -708049
6 478737
10 -281372
-9 -173033
4 -830255
0 -59124
8 29459
5 546685
-1 58624

output:

Yes
-8310.870742816027 -249516.680606345966 1.026361796748

result:

ok Answer is found