Sidesets that share faces

Can someone tell me if there is a way to see if two sidesets share any faces?

Here is a little example that does something like that.

reset
brick x 10
mesh vol all
sideset 1 surf 1
sideset 2 surf 2
group “s1” add face in surf in sideset 1 group “s2” add face in surf in sideset 2 group “s_intersect” intersect s1 with s2 list s_intersect #{_num_in_group = NumInGrp(“s_intersect”)}