Literally: ocean – thousand – mountain – thousand
Alternately: The pinnacle of cunning. A sly old fox. Someone who, though long experience, has developed an almost-unbeatable level of cleverness.
Notes: First, keep in mind that this is about general wits and worldly wisdom, not skill in a specific art or craft.
Remember the notes to 蛇の道は蛇? Well, here we are again. A snake that lives for a thousand years in the mountains and a thousand years in the sea will grow large, and learn many things, and become a dragon. A hebi that has reached ja status is so far above its former snake fellows that there isn’t even grounds for comparison.
Finally, note that some versions use 河 (kawa, “river”) instead of 山, which makes sense if you keep in mind that dragons are associated with water and that rivers seen from a mountain-top might look like long snakes or dragons, slithering across the landscape below.