Problem b. Colors of the Correspondence ≡

Author:П.Р. Месенёв   Time limit:6 sec
Input file:Standard input   Memory limit:512 Mb
Output file:Standard output  
Maximum points:24  

Statement

No Message May Ever Go Undelivered.

Blazing Stars — the Judgements — incessantly erect the law of the universe with each deliverance, prescribing the possibility of existence for all through Correspondence.

This incinerating language is so hazardous to living witnesses that messages written in it must be insulated upon the hard carapace of the postmen — Messengers, whose holy destiny is to promulgate edicts of the Stars.

The Sacred Message must reach its audience in undimmed brightness. Every Correspondence sigil must preserve its distinctness within the shared immanence of the whole. Thus each postman is endowed with a palette fitted to its burden: Violant, Irrigo, Apocyan, Peligin, Viric, Cosmogone, Gant, and others with no distinctive names. Every additional color demands another commitment, one hardly spared in the service of the Gods.

Two sigils inscribed upon touching regions of the carapace must never share a color: should their hues merge, their meanings will merge also, and the law delivered will not be the law ordained.

Choose a sigil to change its hue. Violant and Apocyan answer this.

In the first example, two colors suffice.

The Messenger knows which message its carapace carries. The incarnation of the ink is an immediate problem — one it will gladly transfer to the algorithm you are about to write — because No Message May Ever Go Undelivered.

Input format

The first line contains n and m: the number of carapace regions and the number of touching pairs. Each of the following m lines contains a b, 1 ≤ a,b ≤ n: the regions with these numbers touch. No region touches itself, and no pair is listed twice.

Output format

Print one integer: the minimum number of colors required to deliver the Sacred Message unchanged.

Constraints

1 ≤ n ≤ 24, 0 ≤ m ≤ n(n − 1) / 2.

Sample tests

No. Standard input Standard output
1
4 3
1 2
2 3
3 4
2
2
3 3
1 2
1 3
2 3
3

0.077s 0.014s 18