Studies of the draping and flaring angles of the Mars and Earth magnetotails