package com.menzus.gcj._2012.qualification.c;

import com.menzus.gcj.common.InputBlockParser;
import com.menzus.gcj.common.OutputProducer;
import com.menzus.gcj.common.impl.AbstractProcessorFactory;

public class CProcessorFactory extends AbstractProcessorFactory<CInput, COutputEntry> {
    public CProcessorFactory(String inputFileName) {
	super(inputFileName);
    }

    @Override
    protected InputBlockParser<CInput> createInputBlockParser() {
	return new CInputBlockParser();
    }

    @Override
    protected OutputProducer<CInput, COutputEntry> createOutputProducer() {
	return new COutputProducer();
    }
}


public class Par {

	Integer A,B;
	
	public Par(Integer a,Integer b)
	{
		A=a;
		B=b;
	}
	
	public boolean equals(Object o) {
		boolean res=false;
		Par P=(Par) o;
		if ((P.A.equals(A) && P.B.equals(B))||(P.A.equals(B) && P.B.equals(A)))
		{
			res=true;
		}
		return res;
	}

	public int hashCode() {
		return (A*B+A.hashCode()+B.hashCode());
	}
	
	public String toString()
	{
		return "("+A+", "+B+")";
	}

}
