Solve problem "Has the number been encountered before" online - Learn Python 3 - Snakify

Problem «Has the number been encountered before» (Medium)


Statement

Given a sequence of numbers, determine if the next number has already been encountered. For each number, print the word YES (in a separate line) if this number has already been encountered, and print NO, if it has not already been encountered.


In all the problems input the data using input() and print the result using print().



Saved solutions

Tests

Input Correct answer Result
1 2 3 2 3 4
NO
NO
NO
YES
YES
NO
1 1 1 1 1 1 1 1 1 1
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
1 2 3 4 5 6 7 8 9 10
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
10 10 4 2 5 5 10 4 1 10
NO
YES
NO
NO
NO
YES
YES
YES
NO
YES