1. A memory system, comprising: a cell array of plural cells having three or more settable physical quantity levels and operative to store a code composed of symbols expressed by elements in a finite field Zp (p is a prime), wherein a set of two cells is defined as a pair cell and a combination of physical quantity levels of said two cells contained in said pair cell is defined as a pair cell level, wherein said pair cell uses a pair cell level of plural pair cell levels, which maximizes or minimizes a physical quantity level of one cell contained in said pair cell, to assign elements in said Zp to said pair cell levels, thereby storing symbols of said code.