#include<iostream>
#include<vector>
#include<queue>
#include<stack>
#include<string>
#include<algorithm>
#include<math.h>
using namespace std;
const int maxn = 100001;
vector<int>child[maxn];
int n, maxDepth = 0, num = 0;
void dfs(int index, int depth)
{
if (child[index].size() == 0)
{
if (depth > maxDepth)
{
maxDepth = depth;
num = 1;
}
else if(depth==maxDepth)
{
num++;
}
return;
}
for (int i = 0; i < child[index].size(); i++)
{
dfs(child[index][i], depth + 1);
}
}
int main()
{
int father, root;
int n; double s, r;
cin >> n >> s >> r;
r /= 100;
for (int i = 0; i < n; i++)
{
cin >> father;
if (father != -1)
child[father].push_back(i);
else
root = i;
}
dfs(root, 0);
printf("%.2f %d
", s * pow(1 + r, maxDepth), num);
}