The perimeter of a parallelogram ABCD=40 cm, AB=3x cm, BC=2x cm and CD=2(y+1) cm. Find the values of x and y.