def tupleEqualNoOrder(t1: tuple, t2: tuple) -> bool:
    """Check if two two-element tuples have the same elements."""
    assert len(t1) == 2
    assert len(t2) == 2
    if(t1[0] == t2[0]):
        return t1[1] == t2[1]
    else:
        return t1[0] == t2[1] and t1[1] == t2[0]