N-ary system