On Complete Intersections Contained in Cohen Macaulay and Gorenstein ideals