Submit solution

Points:
7 (partial)

Time limit:
0.6s

Memory limit:
1G

Problem type

Allowed languages

Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, ~~CommonLisp~~, D, Dart, F#, Forth, Fortran, Go, ~~Groovy~~, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, ~~Nim~~, ~~ObjC~~, OCaml, ~~Octave~~, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

Given a directed graph of vertices and edges, determine for each edge if it is possible to reach vertex from vertex given that that edge is deleted from the graph.

#### Constraints

#### Input Specification

The first line of the input contains two space-separated integers, and .

Each of the next lines contains two space-separated integers, and , indicating that the th edge goes from vertex to .

You may assume that any given tuple appears at most once.

#### Output Specification

Output lines.

On the th line, given that the th edge is deleted,
print `YES`

if it is still possible to reach vertex from vertex . Print `NO`

otherwise.

#### Sample Input

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

#### Sample Output

```
NO
YES
NO
```

## Comments

This comment is hidden due to too much negative feedback. Click here to view it.

This comment is hidden due to too much negative feedback. Click here to view it.