Journey among Railway Stations
时间限制:C/C++/Rust/Pascal 3秒,其他语言6秒
空间限制:C/C++/Rust/Pascal 512 M,其他语言1024 M
64bit IO Format: %lld

题目描述

There are  railway stations lying on a straight line, numbered from  to . A strange thing is, each railway station only opens for a continuous period of time  every day. In other words, if a train arrives before time u_i or after time v_i, it can not stop at station .

Many trains travel through these stations every day. It takes cost_i times for each train to travel from station to station  with the top speed. 

If a train driver wants to stop at station  where the train may arrive early, he can choose to run slowly to meet the time requirements of that station. However, there is no way out if the train arrives late even with the top speed.

A new day is coming. As a train driver, now your train is at station , plan to leave for station  at time u_i, and stop at all stations of  along the railway line. You are wondering whether your train can meet the arrival time requirements of all railway stations from  to (boarding and alighting time at each station are ignored).

 days are coming, one of the following three events will happen every day.
  1. Ask whether you can stop the train among each station .
  2. The railway line between station  and station has been repaired and the passing time is changed to . i.e., set .
  3. Station  change its open time to . i.e., set .
Please answer each question of the first type.

输入描述:

The first line of the input contains an integer , indicating the number of test cases. 

For each test case:

The first line contains a integer , indicating the number of stations. The second and third line contains $n$ intergers each, indicating the sequence u_i and v_i. The fourth line contains  integers, indicating the sequence .

The fifth line contains a integer . The next  lines describe the event every day.
: ask whether you can stop the train among each station .
: change cost_i to a new value .
: the open time of station  is changed to .

It's guaranteed that the sum of  over all test cases does not exceed .

输出描述:

For each test case, output the answer for each question of the first type: Output 'Yes' if you can stop the train successfully, otherwise 'No'.
示例1

输入

复制
1
5
1 2 3 4 5
3 4 5 6 7
1 1 1 1
5
0 1 5
1 1 3
0 1 5
2 2 2 3
0 1 5

输出

复制
Yes
Yes
No