All optical NAND gate based on nonlinear photonic crystal ring resonators