from random import*
from math import*
def simvar(V,P,n):
  N=[0,0,0,0]
  y=P[0]
  z=y+P[1]
  t=z+P[2]
  for i in range(n):
    a=random()
    if 0<a<y:
      N[0]=N[0]+1
    if y<a<z:
      N[1]=N[1]+1
    if z<a<t:
      N[2]=N[2]+1
    if a>t:
      N[3]=N[3]+1
  F=[N[0]/n,N[1]/n,N[2]/n,N[3]/n]
  return(F)