Source: http://www.nhvweb.net/vhs/math/jfranz/files/2011/10/7.2-SGI-Day-1-Solutions.pdf