#include<iostream>
using namespace std;

class GreaterThenComparable {
public:
virtual bool operator>( const GreaterThenComparable &b)  const = 0;
} ;    

const GreaterThenComparable &max(const GreaterThenComparable &a,
				   const GreaterThenComparable &b) {
	return (a>b)? a:b;
}

class Int:public GreaterThenComparable {
int val;
public:
Int(int i = 0):val(i){};
operator int() {return val;}; 
virtual bool operator>(const GreaterThenComparable &b) const {
return val>static_cast<const Int&>(b).val;}
};

main() {

Int a(3),b(2);
Int c;
c = (const Int &)::max(a,b);
cout<<(int)c<<endl;
}