#include<iostream>
using namespace std;
template<class numtype>
class Compare
{ private:
numtype x;
numtype y;
public:
Compare(numtype a,numtype b)
{
x=a;
y=b;
}
numtype max()
{
return (x>y)? x:y;
}
numtype min()
{
return (x<y)? x:y;
}
};
int main()
{
Compare<int>cmp1(3,7);
cout<<cmp1.max()<<endl;
cout<<cmp1.min()<<endl;
Compare<float>cmp2(23.12,43.55);
cout<<cmp2.max()<<endl;
cout<<cmp2.min()<<endl;
Compare<char>cmp3('a','d');
cout<<cmp3.max()<<endl;
cout<<cmp3.min()<<endl;
return 0;
}