In an undeformed, continuously deposited sequence of sedimentary rocks (first locality) comprising ten beds numbered 1 (at the base) to 10 (at the top), a number of fossils have the following ranges: trilobites (beds 1 and 2), conodonts (beds 2 and 3), brachiopods (beds 3 to 6), ammonites (bed 5), gastropods (beds 6-8), and bivalves (beds 8-10). In a second locality, rocks of unknown stratigraphic position contain brachiopods and ammonites. These rocks are biostratigraphically correlated to which bed(s) from the first locality?