Problem: You are given a rooted tree on n vertices. The vertices are numbered from 1 to n; the root is the vertex number 1.

Each vertex has two integers associated with it: a_i and b_i. We denote the set of all ancestors of v (including v itself) by R(v). The awesomeness of a vertex v is defined as 

$$$\left| ∑_{w ∈ R(v)} a_w\right| ⋅ \left|∑_{w ∈ R(v)} b_w\right|,$$$

where |x| denotes the absolute value of x. 

Process q queries of one of the following forms: 

  * 1 v x — increase a_v by a positive integer x. 
  * 2 v — report the maximum awesomeness in the subtree of vertex v. 

Input

The first line contains two integers n and q (1 ≤ n ≤ 2⋅ 10^5, 1 ≤ q ≤ 10^5) — the number of vertices in the tree and the number of queries, respectively.

The second line contains n - 1 integers p_2, p_3, ..., p_n (1 ≤ p_i < i), where p_i means that there is an edge between vertices i and p_i.

The third line contains n integers a_1, a_2, ..., a_n (-5000 ≤ a_i ≤ 5000), the initial values of a_i for each vertex.

The fourth line contains n integers b_1, b_2, ..., b_n (-5000 ≤ b_i ≤ 5000), the values of b_i for each vertex.

Each of the next q lines describes a query. It has one of the following forms: 

  * 1 v x (1 ≤ v ≤ n, 1≤ x ≤ 5000). 
  * 2 v (1 ≤ v ≤ n). 

Output

For each query of the second type, print a single line with the maximum awesomeness in the respective subtree.

Example

Input

5 6
1 1 2 2
10 -3 -7 -3 -10
10 3 9 3 6
2 1
2 2
1 2 6
2 1
1 2 5
2 1


Output

100
91
169
240

Note

The initial awesomeness of the vertices is [100, 91, 57, 64, 57]. The most awesome vertex in the subtree of vertex 1 (the first query) is 1, and the most awesome vertex in the subtree of vertex 2 (the second query) is 2. 

After the first update (the third query), the awesomeness changes to [100, 169, 57, 160, 57] and thus the most awesome vertex in the whole tree (the fourth query) is now 2.

After the second update (the fifth query), the awesomeness becomes [100, 234, 57, 240, 152], hence the most awesome vertex (the sixth query) is now 4. 

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const int BSZ = 100;
const double NEGINF = -2e18;
long long A[202020];
long long B[202020];
long long tmp[202020];
int N, Q;
vector<int> adj[202020];
int dfn[202020];
int ed[202020];
int id;
vector<int> ord[2020];
pair<int, int> P[202020];
double leftx[202020][2];
vector<pair<int, int> > stk[2020];
int X[2020];
int ptr[2020];
void dfs(int now, int par) {
  dfn[now] = ++id;
  for (int i : adj[now]) {
    if (i == par) continue;
    dfs(i, now);
  }
  ed[now] = id;
}
void calc_a(int now, int par, long long a) {
  A[now] = a + A[now];
  for (int i : adj[now]) {
    if (i == par) continue;
    calc_a(i, now, A[now]);
  }
}
void calc_b(int now, int par, long long b) {
  for (int i : adj[now]) {
    if (i == par) continue;
    calc_b(i, now, b + B[now]);
  }
  B[now] = abs(b + B[now]);
}
double cross_x(int i, int ti, int j, int tj) {
  long long a1 = (ti ? B[i] : -B[i]);
  long long a2 = (tj ? B[j] : -B[j]);
  long long b1 = (ti ? A[i] * B[i] : -A[i] * B[i]);
  long long b2 = (tj ? A[j] * B[j] : -A[j] * B[j]);
  if (a1 == a2) {
    if (b1 <= b2) return NEGINF;
    return -NEGINF;
  }
  return (double)(b2 - b1) / (a1 - a2);
}
void add_line(int block, int idx, int t) {
  while (stk[block].size()) {
    pair<int, int> bk = stk[block].back();
    if (leftx[bk.first][bk.second] <= cross_x(bk.first, bk.second, idx, t))
      break;
    stk[block].pop_back();
  }
  if (stk[block].size() && cross_x(stk[block].back().first,
                                   stk[block].back().second, idx, t) == -NEGINF)
    return;
  if (!stk[block].size())
    leftx[idx][t] = NEGINF;
  else
    leftx[idx][t] =
        cross_x(stk[block].back().first, stk[block].back().second, idx, t);
  stk[block].push_back({idx, t});
}
void buildCHT(int b) {
  stk[b].clear();
  X[b] = 0;
  for (int i = (int)ord[b].size() - 1; i >= 0; i--) add_line(b, ord[b][i], 0);
  for (int i = 0; i < ord[b].size(); i++) add_line(b, ord[b][i], 1);
}
long long query(int b) {
  int sz = stk[b].size();
  while (ptr[b] < sz) {
    pair<int, int> p = stk[b][ptr[b]];
    if (leftx[p.first][p.second] > X[b]) break;
    ptr[b]++;
  }
  ptr[b]--;
  int ans = stk[b][ptr[b]].first;
  return abs((A[ans] + X[b]) * B[ans]);
}
void updb(int b) {
  for (int i = b * BSZ; i < (b + 1) * BSZ; i++) A[i] += X[b];
  X[b] = ptr[b] = 0;
}
int main() {
  scanf("%d%d", &N, &Q);
  for (int i = 2; i <= N; i++) {
    int x;
    scanf("%d", &x);
    adj[x].push_back(i);
    adj[i].push_back(x);
  }
  for (int i = 1; i <= N; i++) scanf("%lld", &A[i]);
  for (int i = 1; i <= N; i++) scanf("%lld", &B[i]);
  dfs(1, 0);
  calc_a(1, 0, 0LL);
  calc_b(1, 0, 0LL);
  for (int i = 1; i <= N; i++) tmp[dfn[i]] = A[i];
  for (int i = 1; i <= N; i++) A[i] = tmp[i];
  for (int i = 1; i <= N; i++) tmp[dfn[i]] = B[i];
  for (int i = 1; i <= N; i++) B[i] = tmp[i];
  for (int i = 1; i <= N; i++) P[i] = {B[i], i};
  sort(P + 1, P + N + 1);
  for (int i = 1; i <= N; i++) ord[P[i].second / BSZ].push_back(P[i].second);
  for (int i = 0; i <= N / BSZ; i++) buildCHT(i);
  while (Q--) {
    int t;
    scanf("%d", &t);
    int v, l, r;
    scanf("%d", &v);
    l = dfn[v];
    r = ed[v];
    if (t == 1) {
      int x;
      scanf("%d", &x);
      int lb = l / BSZ;
      updb(lb);
      for (int i = l; i < min((lb + 1) * BSZ, r + 1); i++) A[i] += x;
      buildCHT(lb);
      int rb = r / BSZ;
      updb(rb);
      if (lb != rb)
        for (int i = max(rb * BSZ, l); i <= r; i++) A[i] += x;
      buildCHT(rb);
      for (int i = lb + 1; i < rb; i++) X[i] += x;
    } else {
      long long ans = 0;
      int lb = l / BSZ, rb = r / BSZ;
      for (int i = l; i < min(r + 1, (lb + 1) * BSZ); i++)
        ans = max(ans, abs((A[i] + X[lb]) * B[i]));
      for (int i = max(l, rb * BSZ); i <= r; i++)
        ans = max(ans, abs((A[i] + X[rb]) * B[i]));
      for (int i = lb + 1; i < rb; i++) ans = max(ans, query(i));
      printf("%lld\n", ans);
    }
  }
  return 0;
}