Independent control of the vortex chirality and polarity in a pair of magnetic nanodots