Ab initio study of bis(nitrogen dioxide)(1+) and bis(carbon dioxide)(1-) ions