1.There was a notice on which were /was/is written, Everything on sale."
2.Only two students remain in the classroom,and the rest has/have gone to the library.
Why are were and have correct choices in the above senteces ?Thanks a lot!