3882 - [Wc2015]K小割

Input

Output

Examples

Input

3 3 1 3 100
1 2 3
2 3 4
1 3 5

Output

8
9
12
-1
Time Limit 1 second
Memory Limit 128 MB
Discuss Stats
上一题 下一题