The PDF version of this problem can be downloaded here. The whole problemset as one file can be downloaded here.
3 5 5 1 2 3 5 5 2 4 4 4 4 5 5 3 1 2 2 1 2 2
NO NO YES
Migrated from old NTUJ.
2011 ICPC Phuket