#include <iostream>
typedef bool(*validateFcn)(int, int);
bool SomeValidateFunction(int a, int b)
{
return a > 0 && b > 0;
}
bool validate(int nX, int nY, validateFcn pfcn)
{
if(pfcn(nX,nY)) printf("Valid");
}
int main()
{
validate(1, 1, SomeValidateFunction);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKdHlwZWRlZiBib29sKCp2YWxpZGF0ZUZjbikoaW50LCBpbnQpOwoKYm9vbCBTb21lVmFsaWRhdGVGdW5jdGlvbihpbnQgYSwgaW50IGIpCnsKCXJldHVybiBhID4gMCAmJiBiID4gMDsJCn0KCmJvb2wgdmFsaWRhdGUoaW50IG5YLCBpbnQgblksIHZhbGlkYXRlRmNuIHBmY24pCnsKICAgICBpZihwZmNuKG5YLG5ZKSkgcHJpbnRmKCJWYWxpZCIpOwp9CgppbnQgbWFpbigpIAp7Cgl2YWxpZGF0ZSgxLCAxLCBTb21lVmFsaWRhdGVGdW5jdGlvbik7CglyZXR1cm4gMDsKfQ==