public class Breuk1 {
	public Breuk1() { 
	}
	public Breuk1(int tt) {
		t=tt;
	} 
	public Breuk1(int tt, int nn) {
		t=tt; n=nn;
	}
	public Breuk1(Breuk1 b) {
		t=b.t; n=b.n;
		normaliseer();
	}
	public void add(Breuk1 b) {
		t=t*b.n+b.t*n;
		n*=b.n;
		normaliseer();
	}
	//...
	private int ggd(int n, int m) {
		if (n==0) return m;
		if (m==0) return n;
		while (m!=n)
			if (n>m) n-=m;
			else m-=n;
		return n;
	}
	private void normaliseer() {
		if (n<0) {
			n=-n;
			t=-t;
		}
		int d=ggd(t<0?-t:t,n);
		t/=d;
		n/=d;
	}
	private int t=0;
	private int n=1;
}