#include <bits/stdc++.h>
#pragma GCC optimization("O3")
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using vi = vector<int>;
using ld = double;
const int N = 2e5;
const int B = 180;
const int C = (N + B - 1) / B;
int n, q;
vi g[N];
int a[N], b[N];
int in[N], out[N], tik_tak = -1, eu[N];
void dfs(int v, int p) {
  in[v] = ++tik_tak;
  eu[tik_tak] = v;
  for (int to : g[v]) {
    if (to != p) {
      a[to] += a[v];
      b[to] += b[v];
      dfs(to, v);
    }
  }
  out[v] = tik_tak;
}
struct Line {
  ll k, b;
  int id;
  ld isec(Line& l) { return (1.0 * b - l.b) / (l.k - k); }
  bool operator<(const Line& l) const { return k < l.k; }
};
int s[C];
Line H[C][2 * B];
vector<Line> L[C];
ll x[C];
int pt[C];
inline void push(int i) {
  if (s[i] <= pt[i]) {
    pt[i] = s[i] - 1;
  }
  while (pt[i] < s[i] - 1) {
    if (x[i] < H[i][pt[i]].isec(H[i][pt[i] + 1])) {
      break;
    }
    pt[i]++;
  }
}
inline void add(int i, Line l) {
  while (s[i] > 1) {
    Line u = H[i][s[i] - 2];
    Line v = H[i][s[i] - 1];
    if (l.k == v.k) {
      if (l.b < v.b) {
        return;
      }
    } else {
      if (l.isec(u) < l.isec(v)) {
        break;
      }
    }
    s[i]--;
  }
  if (s[i] == 1) {
    Line v = H[i][s[i] - 1];
    if (l.k == v.k) {
      if (l.b < v.b) {
        return;
      }
      s[i]--;
    }
  }
  H[i][s[i]++] = l;
  push(i);
}
inline ll eval(int i) { return H[i][pt[i]].k * x[i] + H[i][pt[i]].b; }
int32_t main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> q;
  for (int i = 0; i < n - 1; i++) {
    int p;
    cin >> p;
    --p;
    g[p].push_back(i + 1);
  }
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n; i++) {
    cin >> b[i];
  }
  dfs(0, -1);
  for (int i = 0; i < n; i++) {
    b[i] = abs(b[i]);
  }
  for (int i = 0; i < (n + B - 1) / B; i++) {
    int l = B * i, r = min(n - 1, B * (i + 1) - 1);
    L[i].reserve(2 * (r - l + 1));
    for (int j = l; j <= r; j++) {
      int id = eu[j];
      L[i].push_back({b[id], 1LL * a[id] * b[id], j});
      L[i].push_back({-b[id], -1LL * a[id] * b[id], j});
    }
    sort((L[i]).begin(), (L[i]).end());
    for (auto& l : L[i]) {
      add(i, l);
    }
  }
  while (q--) {
    int type, v;
    cin >> type >> v;
    --v;
    int l = in[v], r = out[v];
    int LL = l / B, RR = r / B;
    if (type == 1) {
      int d;
      cin >> d;
      for (int p : {LL, RR}) {
        s[p] = pt[p] = 0;
        for (Line& u : L[p]) {
          if (l <= u.id && u.id <= r) {
            if (u.k >= 0) {
              u.b += 1LL * d * b[eu[u.id]];
            } else {
              u.b -= 1LL * d * b[eu[u.id]];
            }
          }
          add(p, u);
        }
        if (LL == RR) {
          break;
        }
      }
      LL++;
      RR--;
      for (int i = LL; i <= RR; i++) {
        x[i] += d;
        push(i);
      }
    } else {
      ll ans = 0;
      for (int p : {LL, RR}) {
        for (Line& u : L[p]) {
          if (l <= u.id && u.id <= r) {
            ans = max(ans, abs(u.k * x[p] + u.b));
          }
        }
        if (LL == RR) {
          break;
        }
      }
      LL++;
      RR--;
      for (int i = LL; i <= RR; i++) {
        ans = max(ans, eval(i));
      }
      cout << ans << '\n';
    }
  }
}
