square detecting hash set