#include<iostream>
using namespace std;
void square(int value)
{
int total = pow(value, 2);
cout << total << endl;
}
void cube(int value)
{
int total = pow(value, 3);
cout << total << endl;
}
int main()
{
int value;
cout << "Enter value: ";
cin >> value;
if (value % 2 == 0)
{
square(value);
}
else
{
cube(value);
}
return 0;
}