#!/usr/bin/python3

if __name__=='__main__':
    v1 = [i for i in range(256)]
    v2 = [i for i in range(256)]
    codes = []
    for e1 in v1:
        for e2 in v2:
            codes.append( (e1+e2,e1-e2) )
    #------
    for i in range(10):
        print(codes[i])
    #------
    unique_codes = []
    f = open('unique_codes.txt', 'w')
    for code in codes:
        if code not in unique_codes:
            f.write(str(code)+'\n')
            unique_codes.append(code)
    f.close()
    #------
    print('Total numbers of codes:', len(codes))
    print('Total numbers of unique codes:', len(unique_codes))