This paper examines the optimal provision of incentives in the repeated setting with many agents under the restriction that only relative performance evaluation is feasible for contracting. We show that the optimal contract in the repeated setting may take a different form than that in the static setting. In the repeated setting, it may be optimal for the principal to arbitrarily divide the agents into teams and compensate them based on team ranking, as it allows the principal to motivate the agents through peer sanctions. The situation draws a clear contrast to the static setting where such a strategy is never optimal. The result indicates that the concept of team plays an important role in the repeated setting even when performances can only be evaluated in relative terms.