Everpure Interview Question

Fire Events and Valid Square.