public boolean isIn(Object value){
        if (first.equals(value) || second.equals(value)){
            return true;
        }
        boolean isInFirst = false, isInSecond = false;
        
        if(first instanceof Pair){
            isInFirst = ((Pair)first).isIn(value);
        }else if(second instanceof Pair){
            isInSecond = ((Pair)second).isIn(value);
        }
        return (isInFirst || isInSecond);
    }