#include <iostream>
#include <vector>
#include <cstdio>
#include <queue>
#include <cstring>
using namespace std;
const int maxn = 2e5 + 6;
typedef struct P
{
int d;
vector<int> a;
}P;
P p[maxn];
double qow(double p, int n)
{
double c = 1;
while(n)
{
if(n & 1)
{
c = p * c;
}
p = p * p;
n >>= 1;
}
return c;
}
int flag[maxn];
void bfs(double aa, double r)
{
int t = p[0].a[0];
queue<int> q;
q.push(t);
memset(flag, 0, sizeof(flag));
flag[t] = 1;
p[t].d = 0;
int cnt = 0, m = 0;
while(!q.empty())
{
t = q.front();
//cout << t << endl;
q.pop();
for(int i = 0; i < p[t].a.size(); i++)
{
int tt = p[t].a[i];
if(flag[tt] == 0)
{
flag[tt] = 1;
q.push(tt);
p[tt].d = p[t].d + 1;
//cout << tt << " " << p[tt].d << endl;
if(p[tt].d > m)
{
m = p[tt].d;
cnt = 1;
}
else if(p[tt].d == m)
{
cnt++;
}
}
}
}
printf("%.2f %d\n", aa * qow((1 + r / 100), m), cnt);
}
int main()
{
int n, x, f;
double t, r;
while(scanf("%d%lf%lf", &n, &t, &r) != -1)
{
for(int i = 1; i <= n; i++)
{
scanf("%d", &x);
x++;
p[x].a.push_back(i);
}
if(n == 1)
{
printf("%.2f 1", t);
continue;
}
bfs(t, r);
}
return 0;
}