You can use the polygon tool, that would work, or you could do it this way:
Select the whole thing - and convert that selection to a shape or path. Now you have a perfect outline rectangle that is a path. Take the pen tool that has the minus ( - ) sign right next to it, and click it over one of the dots on one of the corners of your rectangle. You now have a perfect split triangle made from your perfect rectangle dimensions. Takes you three commands, and you are done.
And, as they said, just invert it for the other side.
// Art is what you can get away with.
<-- Andy Warhol