SP11090 BANNER - Large banner

Description

Bessie is returning from a long trip abroad to the Isle of Guernsey, and Farmer John wants to mount a nice "Welcome Home" banner for her arrival. Farmer John's field has integer dimensions M x N (1

Input Format

\* Line 1: Five space-separated integers: M, N, L, H and B.

Output Format

\* Line 1: One integer denoting the number of possible banners (modulo B).