def get_pairs(val):
    """Given val, returns the set of pairs 1 <= {i, j} <= val, s.t. order does not matter"""
    pairs = []
    for i in range(val):
        for j in range(i, val):
            pairs.append([i, j])

    return pairs