'Coding has over 700 languages', '67% of programming jobs aren’t in the
technology industry', 'Coding is behind almost everything that is powered
by electricity'

Topics

You are given a graph with 'N' vertices numbered from '1' to 'N' and 'M' edges. You have to colour this graph in two different colours, say blue and red such that no two vertices connected by an edge are of the same colour.

```
The given graph may have connected components.
```

Detailed explanation

```
1 <= E <= 10 ^ 5
1 <= V <= 10 ^ 6
Time Limit: 1 sec
```

```
4 4
1 2
2 3
3 4
4 1
```

```
YES
```

```
One possible coloring of the graph is:
```

```
3 3
1 2
2 3
3 1
```

```
NO
```