A cat and dog live in a square room. The corners of the room are numbered 1, 2, 3 and 4. Each night, the cat decides at random at which corner it will sleep. The dog joins the cat in that corner with probability 1/2, but otherwise it chooses one of the remaining three cornerse at random. Denote by X the numbr of the corner the cat will sleep at, and by Y the number of the dog's corner.

Derive the pmf formula p(x,y) of the bivariate random variable (X,Y).