Shabbos 11:4-5
Shabbos 11:4
If a person throws something four cubits (about six feet) in the public domain and it lands in the sea (which is a domain called a karmelis, which is not well-traveled), he is exempt. If there was a shallow body of water in a public domain (so that people cross it), one who throws four cubits into it would be liable. The definition of "shallow" is less than ten handbreadths (about 30 inches).
Shabbos 11:5
If a person throws something from the sea to dry land or vice versa, or from the sea to a ship or vice versa, or from one ship to another, he is exempt. If two ships are tethered together, one is actually permitted to transport things between them on Shabbos. One may not do this with ships that are not tied to one another even if they are close together.