#include <iostream>

using namespace std;

class Razlomak
{
public:
	Razlomak( int b = 0, int i = 1 )
		: _Brojilac(b),
		  _Imenilac(i)
	{}

	int Imenilac() const
		{ return _Imenilac; }
	int Brojilac() const 
		{ return _Brojilac; }

	void Ispisi( ostream& ostr ) const
		{ ostr << _Brojilac << '/'<< _Imenilac; }

	void Citaj( istream& istr )
		{ 
		char c;
		istr >> _Brojilac >> c >> _Imenilac; 
		}

private:
	int _Imenilac;
	int _Brojilac;
};

ostream& operator << ( ostream& ostr, const Razlomak& r )
{
	r.Ispisi(ostr);
	return ostr;
}

istream& operator >> ( istream& istr, Razlomak& r )
{
	r.Citaj(istr);
	return istr;
}

main()
{
	Razlomak r1(4,5);
	Razlomak r2(4);
	Razlomak r3;
	
	cout 	<< r1 << endl
		<< r2 << endl
		<< r3 << endl;

	cin >> r1;
	cout << r1 << endl;
	
	return 0;
}



