Function to check if a number is a perfect Cube or not
bool isPerfectCube ( int x ) { int cr = round ( cbrt ( x ) ) ; return ( cr * cr * cr == x ) ; } void canBePerfectCube ( int N , int K ) { if ( isPerfectCube ( N + K ) || isPerfectCube ( N - K ) ) cout << " Yes STRNEWLINE " ; else cout << " No STRNEWLINE " ; }