Earth has just one Moon, which makes it pretty simple for it to avoid collisions with other large objects since, well, there’s nothing for it to collide with. Other moons don’t have it nearly so good. Neptune, for example, has over a dozen moons, and for all those tiny worlds to coexist, some interesting patterns have emerged.

In a new post, NASA highlights one relationship in particular. the moons Naiad and Thalassa travel in very similar orbital neighborhoods, only separated by some 1,150 miles. That’s a hair’s width in planetary terms, so why don’t the two moons cause problems for one another? The short answer is that they dance.

You see, while the orbits of the two moons are relatively close, they never get closer than around 2,200 miles from one another. That’s because Naiad, which orbits at a slightly faster pace, is locked into a sort of wavey motion that ensures the two moons never cross paths. No matter how many times the two moons complete an orbit of their host planet, the pattern remains the same, with Thalassa cruising on a straight loop as Naiad zigzags around it, either above or below the orbit of its sister moon.

“We refer to this repeating pattern as a resonance,” Marina Brozović of NASA’s Jet Propulsion Laboratory explains. “There are many different types of ‘dances’ that planets, moons and asteroids can follow, but this one has never been seen before.”Brozović is the lead author of a new paper describing the discovery.

Exactly how this unique pattern originated is unknown, but the researchers have a few guesses. The most likely scenario is that Naiad had a run-in with another one of Neptune’s moons long ago. This could have pushed it off its previous course and forced it into a tilted orbit. Whatever the cause, it sure is cool to see it today.