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 MyPair 
	{
		public MyPair(String str) {
			
			lowerLimit = Integer.parseInt(str.split(" ")[0]);
			higherLimit = Integer.parseInt(str.split(" ")[1]);
		}
		
		public MyPair(int str, int str2) {
			
			lowerLimit = str;
			higherLimit = str2;
		}
		
		public boolean sameAs(MyPair other) {
			if ((other.lowerLimit == lowerLimit && other.higherLimit == higherLimit )||
				(other.lowerLimit == higherLimit && other.higherLimit == lowerLimit ) ) {
				return true;
			}
			return false;

		}
		public int lowerLimit;
		public int higherLimit;
	}