def is_sorted(lst):
    count_digit = dict([(i, 0) for i in lst])
    for i in lst:
        count_digit[i]+=1 
    if any(count_digit[i] > 2 for i in lst):
        return False
    if all(lst[i-1] <= lst[i] for i in range(1, len(lst))):
        return True
    else:
        return False
    
    
def is_sorted(lst):
    count_digit = dict([(i2, 0) for i2 in lst])
    for i2 in lst:
        count_digit[i2] += 1
    if any(count_digit[i2] > 2 for i2 in lst):
        return False
       
    if all(lst[i2 - 1] <= lst[i2] for i2 in range(1, len(lst))):
        return True
    else:
        return False