#include<cstdio>
#include<vector>
#include<iostream>
#include<queue>
#include<cmath>
#define maxn 100100
#define inf 1000000000
using namespace std;
struct node {
int d, l; // index, level
node(int _d, int _l) : d(_d), l(_l) {}
};
vector<int> child[maxn];
int parents[maxn];
int findroot(int a) {
int t = a;
while(parents[t] != inf) {
t = parents[t];
}
return t;
}
int nearest(int &n) { // return level
int level = -1, num = 0;
queue<node> q;
q.push(node(0, 0));
while (!q.empty()) {
node temp = q.front();
int t = temp.d;
q.pop();
if (level != -1 && temp.l != level) break;
else if (level == -1) {
if (child[t].size() == 0) {
level = temp.l;
num = 1;
}
else {
for (int i = 0; i < child[t].size(); i++) {
q.push(node(child[t][i], temp.l + 1));
}
}
}
else if (temp.l == level && child[t].size() == 0) {
num++;
}
}
n = num;
return level;
}
int main() {
int N;
double P, R;
scanf("%d %lf %lf", &N, &P, &R);
for (int i = 0; i < N; i++) {
parents[i] = inf;
}
int childnum, a;
for (int i = 0; i < N; i++) {
scanf("%d", &childnum);
while(childnum--) {
scanf("%d", &a);
child[i].push_back(a);
parents[a] = i;
}
}
int num = 0;
int level = nearest(num);
printf("%.4f %d\n", P * pow(1 + R * 0.01, level), num);
return 0;
}