Zevachim, Perek 4, Mishnah 1. This is the final chapter dealing with invalidating thoughts - thoughts that have the power to invalidate the sacrifice. The background to this Mishnah is that different sacrifices have different requirements regarding the application of their blood on the altar: some require four applications, some require two, and some require only one application.
The requirements for the application of blood on the altar:
Four applications - The sin offering, whose blood is applied to the four corners of the altar.
Two that are four - The other primary sacrifices: the burnt offering, guilt offering, peace offering, and thanksgiving offering. The kohen makes two applications on two corners - the northeast corner and then the southwest corner - and thus the blood reaches all four walls, even though there are only two applications here.
One application - The lesser sacrifices: the tithe, firstborn, and Passover offerings. As long as the blood is applied above the base and below the red line, it is valid.
All this is the ideal requirement. But post facto, the moment the blood reaches the altar in the correct place, atonement is achieved and the sacrifice is valid, and the person has fulfilled his obligation with the first application. For example, in the case of a burnt offering, which requires two applications that are four: if after the kohen applied the blood on the northeast corner, and on his way to the southwest corner the blood spilled from his hand and he is unable to complete the second application - post facto the sacrifice is valid, since the blood reached the altar.
The dispute between Beis Shammai and Beis Hillel:
Beis Shammai disagree on one point: based on reasons derived from the verses (and actually from a more complex derivation), they hold that a sin offering requires a minimum of two applications and not just one. However, the halachah follows Beis Hillel, that a single application is sufficient for all eight types of sacrifices.
Because of this, the Mishnah establishes that if an invalidating thought - such as the thought to consume it beyond its proper time - accompanied the sacrifice after the first application, it does not invalidate the sacrifice. For example: the kohen offered a peace offering, properly made the application on the northeast corner, and when turning to the southwest corner he had the thought to eat the peace offering beyond its proper time and sprinkled the blood - the sacrifice is valid. Even though the sprinkling was performed with a thought of beyond its proper time, this has no effect, since the sacrifice was already accomplished and the obligation fulfilled with the first application. This is the general concept of the Mishnah.
The text of the Mishnah:
"Beis Shammai omerim: Kol hanitanin al hamizbe'ach hachitzon" - All sacrifices whose blood is applied on the outer altar, which are the vast majority of the sacrifices we are dealing with. "She'im netanan matanah achas - kiper" - Even if he made only one application, it effects atonement and is valid. "Uvechatas shetei matanos" - For a sin offering, based on other verses, at least two applications are required on two of the corners.
"Uveis Hillel omerim: Af chatas shenatan matanah achas - kiper" - According to Beis Hillel, one application is always all that is required for the sake of atonement, and even for a sin offering, one application is sufficient post facto.
"Lefichach" - And from this emerges the ruling according to Beis Hillel: "Im natan et harishonah kesiknah vehasheniyah chutz lizmanah - kiper" - The kohen performed the first blood application properly, and during the second application he had a thought of beyond its proper time - that the sacrifice would be offered or eaten at an improper time. This does not invalidate it: the sacrifice is valid, the person has fulfilled his obligation, and everything is post facto acceptable. The window has closed, and invalidating thoughts can no longer invalidate the sacrifice.
"Natan et harishonah chutz lizmanah vehasheniyah chutz limkomah" - During the first application, on the northeast corner, he had a thought of an improper time, and during the second application he had a thought of beyond its proper place. Seemingly, there was room to say that there were two contradictory thoughts here, and it has already been established above that when two different invalidating thoughts are combined, the sacrifice is not piggul, as a pure thought of beyond its proper time is required. Nevertheless, in this case the sacrifice is piggul and incurs kares, and anyone who eats from it will be liable for kares. The reason: the first application is the deciding one, and since it was performed with a thought of beyond its proper time, the sacrifice is piggul, and the nature of the thought during the second application has no impact whatsoever. This is the opinion of Beis Hillel.
The view of Beis Shammai in this case:
Beis Shammai, who are explicitly mentioned in the Mishnah, do not hold this way. In their opinion, at least regarding a chatas, the first two applications of blood are indispensable and required. Therefore, if the first application was done with an intention of outside its proper time and the second with an intention of outside its proper place, the two intentions combine, and the offering is not pigul - it is certainly invalid, but not pigul, since there was not exclusively an intention of outside its proper time, but rather an intention of outside its proper place was mixed into it.
In summary: We learned the requirements for the application of blood - four applications for a chatas, two that are four for an olah, asham, shelamim, and todah, and one application for a maaser, bechor, and pesach - and that after the fact, one application provides atonement. Beis Shammai require two applications for a chatas, but the halachah follows Beis Hillel: from the moment the first blood application is performed for any of the offerings placed on the altar, the matter is concluded, and an invalidating intention during the subsequent applications makes no difference.