#include <stdio.h>

// プロトタイプ宣言
double power(double x, int n);

int main(void) {
	double a;
	int b;
	
	scanf("%lf,%d", &a, &b);
	printf("%f ^ %d\n",a,b);
	printf("%f\n",power(a,b));
	return 0;
}

// 関数xのn乗
double power(double x, int n)
{
	int i;
	double ans=1.0;
	
	for(i=0; i<n; i++)
		ans *= x;
		
	return ans;	
}
