Time limit
2s
Memory limit
128 MB
A natural number can be classified in two ways: as a Lee-myeon number and as an Im-hyeon number.
A number is a Lee-myeon number if both conditions below hold.
A number is an Im-hyeon number if at least one of the conditions below holds.
A number that is neither Lee-myeon nor Im-hyeon is called a Seong-gyeong number.
Given a natural number N, print the result of this classification. Print 1 if N is only a Lee-myeon number, 2 if N is only an Im-hyeon number, 3 if N is neither, and 4 if N is both.
The first line contains the natural number N to classify. It satisfies 1 <= N <= 2700.
Print the classification result on the first line.
The number 11 belongs to the absolute class, but its digit sum is 1 + 1 = 2, which is even, so it is not a Lee-myeon number. It is not 2 or 4, and it is not composite, so it is not an Im-hyeon number either. Therefore it is a Seong-gyeong number.