#include<iostream>
#include<iomanip>
using namespace std;
int shu[100],up[2],down[2];
int main()
{
int i,j,temp,jishu,baoji;
double a,b;
while((cin>>shu[0]) && shu[0]!=0)
{
a=0;
b=0;
up[0]=0;
up[1]=0;
down[0]=0;
down[1]=0;
i=0;
do
{
i++;
cin>>shu[i];
}while(shu[i]!=0);
j=0;
while(j<i-1)
{
temp=0;
if(shu[j]==shu[j+1] && j<i-1)
{
jishu=0;
while(shu[j]==shu[j+1])
{
jishu++;
j++;
}
temp=jishu;
if(shu[j]<shu[j+1])
baoji=0;
else
baoji=1;
}
if(shu[j]<shu[j+1] && j<i-1)
{
up[0]++;
baoji=0;
jishu=temp;
temp=0;
while(shu[j]<=shu[j+1] && j<i-1)
{
jishu++;
j++;
}
up[1]+=jishu;
}
if(shu[j]>shu[j+1] && j<i-1)
{
down[0]++;
baoji=1;
jishu=temp;
temp=0;
while(shu[j]>=shu[j+1] && j<i-1)
{
jishu++;
j++;
}
down[1]+=jishu;
}
}
if(up[0]!=0)
a=double(up[1])/up[0];
if(down[0]!=0)
b=double(down[1])/down[0];
cout<<"Nr values = "<<i<<": "<<setiosflags(ios::fixed)<<a
<<" "<<setiosflags(ios::fixed)<<b<<endl;
}
return 0;
}