Alternatively, the non-MPM may be classified into at least 2 or more groups. For example, the non-MPM may include a second candidate group and a third candidate group. When an intra prediction mode of a current block is not derived from a first candidate group, an intra prediction mode of a current block may be derived by selectively using any one of a second candidate group or a third candidate group.