import math import itertools N,W = map(int,input().split()) X=[];Y=[];R=[];V=[];A=[] for _ in range(N): x,y,r,v,a = map(int,input().split()) X.append(x);Y.append(y);R.append(r);V.append(v);A.append(a) #print(X,Y) def touch(p,q,t,i): #今(p,q)に時間tでいてi番目の寿司を手に入れるのにかかる時間と最後の座標 x = X[i]; y = Y[i]; r = R[i]; v = V[i]; a = A[i] sx = x + r*math.cos(math.radians(v*t+a)) sy = y + r*math.sin(math.radians(v*t+a)) if (p,q) == (sx,sy): return p,q,t ng = 0 ok = 1000 E = pow(10,-10) while abs(ok-ng) > E: mid = (ok+ng)/2 mx = x + r*math.cos(math.radians(v*(t+mid)+a)) my = y + r*math.sin(math.radians(v*(t+mid)+a)) dis2 = pow(mx-p,2) + pow(my-q,2) if dis2 <= (mid*W)**2: ok = mid else: ng = mid nt = t + ok np = x + r*math.cos(math.radians(v*nt+a)) nq = y + r*math.sin(math.radians(v*nt+a)) return np, nq, nt B = [i for i in range(N)] Order = list(itertools.permutations(B,N)) ans = 1<<60 for L in Order: x0 = 0; y0 = 0; t = 0 #原点スタート for i in L: x0, y0, t = touch(x0,y0,t,i) #print(t,X) ans = min(ans,t) print(ans)