Dual string pairs with N = 1 and N = 2 supersymmetry in four dimensions