#include<bits/stdc++.h>
using namespace std;
#define mst(x,y) memset(x,y,sizeof(x))
#define rep(x,y,z) for(int x=(y);(x)<(z);x++)
const int maxn=1e5+10;
int n,dep[maxn],ub=-1,h=maxn,cnt[maxn];
vector<int> g[maxn];
double p,c;
void dfs(int u,int d){
dep[u]=d,ub=max(ub,d);
rep(i,0,g[u].size())
dfs(g[u][i],d+1);
if(g[u].size()==0){
cnt[d]++;
h=min(h,d);
}
}
int main(){
scanf("%d%lf%lf",&n,&p,&c);
c/=100;
rep(i,0,n){
int k,x;
scanf("%d",&k);
rep(j,0,k){
scanf("%d",&x);
g[i].push_back(x);
}
}
dfs(0,0);
int idx=0;while(cnt[idx]==0) idx++;
rep(i,0,h) p*=(1+c);
printf("%.4f %d\n",p,cnt[idx]);
return 0;
}