added c++ version of simple perfect squared rectangles