Nesting of 'a' will not be possible.
However if you badly want to keep the structure and still make it work like the way you want,
then override the anchor tag click in javascript /jquery .
so you can have 2 event listeners for the two and control them accordingly.