Question:  The Great Works River flows to meet the tidal part of the Salmon Falls River at a town with a co-educational university-preparatory day school founded in what year?
Context: Salmon Falls Creek is a tributary of the Snake River, flowing from northern Nevada into Idaho in the United States.  Formed in high mountains at the northern edge of the Great Basin, Salmon Falls Creek flows northwards 121 mi , draining an arid and mountainous basin of 2103 mi2 .  The Salmon Falls Creek valley served as a trade route between the Native American groups of the Snake River Plain and Great Basin.  Today, most of its water is used for irrigation. South Berwick is a town in York County, Maine, United States.  The population was 7,220 at the 2010 census.  South Berwick is home to Berwick Academy, a private, co-educational university-preparatory day school founded in 1791. The Great Works River is a 30.6 mi river in southwestern Maine in the United States.  It rises in central York County and flows generally south past North Berwick to meet the tidal part of the Salmon Falls River at South Berwick. Great East Lake is an 1825 acre water body located in Carroll County, New Hampshire, and York County, Maine, in the United States.  The lake is shared by the towns of Wakefield, New Hampshire, and Acton, Maine, with 45% of its surface area in Acton and 55% in Wakefield.  The lake is the farthest upstream of the five headwater lakes of the Salmon Falls River, a tributary of the Piscataqua River.  Water from Great East Lake flows out its dam and through the 800 ft Newichawannock Canal into Horn Pond, then into the Salmon Falls River below Horn Pond. The Little River is a 21.3 mi tributary of the Salmon Falls River in the U.S. state of Maine.  It rises from streams in York County, flows southwest through Lebanon, and reaches its confluence with the Salmon Falls River in Berwick. The Piscataqua River ( ) is a 12 mi tidal river forming the boundary of the U.S. states of New Hampshire and Maine from its origin at the confluence of the Salmon Falls River and Cocheco River.  The drainage basin of the river is approximately 1495 sqmi , including the subwatersheds of the Great Works River and the five rivers flowing into Great Bay: the Bellamy, Oyster, Lamprey, Squamscott, and Winnicut. Salmon Falls, is the series of falls on the Snake River, in Twin Falls County, Idaho, comprising the Upper Salmon Falls and Lower Salmon Falls, near Hagerman.  The Upper Salmon Falls are about 40 miles West of Shoshone Falls.  Lower Salmon Falls is about 5 miles downstream from Upper Salmon Falls.  The Lower Falls have been cut off by the Lower Salmon Falls Dam and most of it inundated by the reservoir. Lovell Lake is a 538 acre water body in Carroll County in eastern New Hampshire, United States, in the town of Wakefield.  The lake is both spring-fed and fed by small streams including Horse Brook.  The outlet of the lake, located at the village of Sanbornville, is the beginning of the Branch River.  From here, the Branch River flows through Milton where it joins the Salmon Falls River on the Maine-New Hampshire border.  The Salmon Falls River empties into the tidal waters of the Piscataqua River northwest of Portsmouth, New Hampshire, then into the Gulf of Maine. Milton Pond is a 271 acre water body located along the border between Strafford County, New Hampshire, and York County, Maine in the northeastern United States.  The lake lies in the towns of Milton, New Hampshire, and Lebanon, Maine.  It connects with Northeast Pond to the northeast, and with Town House Pond to the north.  A dam at the outlet of Milton Pond controls the water level for all three lakes.  Below the dam, the Salmon Falls River flows southeast along the Maine-New Hampshire border until it reaches the Piscataqua River. The Neoutaquet River is a 7.8 mi tributary of the Great Works River in southern Maine.  It flows entirely within the town of North Berwick.  Via the Great Works and Salmon Falls rivers, it is part of the Piscataqua River watershed, flowing ultimately to the Atlantic Ocean.
Answer: 1791