#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  for (; !isdigit(ch); ch = getchar()) {
    if (ch == '-') f = -1;
  }
  for (; isdigit(ch); ch = getchar()) {
    x = x * 10 + ch - 48;
  }
  return x * f;
}
const int mxN = 2e5;
const long long INF = 1e10;
int n, q;
struct Edge {
  int v, nxt;
} e[(mxN << 1) + 3];
int fe[mxN + 3];
int fa[mxN + 3];
int dfn[mxN + 3], idfn[mxN + 3];
long long a[mxN + 3], b[mxN + 3];
int sz[mxN + 3];
int en, dfnn;
void addedge(int u, int v) {
  en++;
  e[en].v = v;
  e[en].nxt = fe[u];
  fe[u] = en;
}
void dfs1(int u) {
  dfn[u] = ++dfnn;
  idfn[dfnn] = u;
  sz[u] = 1;
  for (int i = fe[u]; i; i = e[i].nxt) {
    int v = e[i].v;
    if (v == fa[u]) continue;
    b[v] += b[u];
    a[v] += a[u];
    dfs1(v);
    sz[u] += sz[v];
  }
}
struct SegmentTree {
  struct SgTNode {
    long long rst, tag;
    pair<long long, long long> mx;
  } sgt[(mxN << 2) + 3];
  void maketag(int u, long long x) {
    sgt[u].tag += x, sgt[u].rst -= x;
    sgt[u].mx.second += sgt[u].mx.first * x;
  }
  void pushdown(int u) {
    if (sgt[u].tag) {
      maketag(u << 1, sgt[u].tag);
      maketag(u << 1 | 1, sgt[u].tag);
      sgt[u].tag = 0ll;
    }
  }
  long long calc(pair<long long, long long> x, pair<long long, long long> y) {
    return x.first <= y.first
               ? INF
               : (y.second - x.second) / (x.first - y.first) + 1ll;
  }
  void pushup(int u) {
    sgt[u].rst = min(sgt[u << 1].rst, sgt[u << 1 | 1].rst);
    if (sgt[u << 1].mx.second > sgt[u << 1 | 1].mx.second) {
      sgt[u].mx = sgt[u << 1].mx;
      sgt[u].rst = min(sgt[u].rst, calc(sgt[u << 1 | 1].mx, sgt[u << 1].mx));
    } else {
      sgt[u].mx = sgt[u << 1 | 1].mx;
      sgt[u].rst = min(sgt[u].rst, calc(sgt[u << 1].mx, sgt[u << 1 | 1].mx));
    }
  }
  void build(int u, int le, int ri, long long a[], long long b[]) {
    if (le == ri) {
      sgt[u].rst = INF;
      sgt[u].mx = make_pair(b[idfn[le]], a[idfn[le]] * b[idfn[le]]);
      return;
    }
    int mid = (le + ri) >> 1;
    build(u << 1, le, mid, a, b);
    build(u << 1 | 1, mid + 1, ri, a, b);
    pushup(u);
  }
  void add(int u, int le, int ri, int lb, int rb, long long x) {
    if (le >= lb && ri <= rb) {
      maketag(u, x);
      return;
    }
    int mid = (le + ri) >> 1;
    pushdown(u);
    if (lb <= mid) {
      add(u << 1, le, mid, lb, rb, x);
    }
    if (rb > mid) {
      add(u << 1 | 1, mid + 1, ri, lb, rb, x);
    }
    pushup(u);
  }
  void verify(int u) {
    if (sgt[u].rst > 0) return;
    pushdown(u);
    verify(u << 1);
    verify(u << 1 | 1);
    pushup(u);
  }
  long long query(int u, int le, int ri, int lb, int rb) {
    if (le >= lb && ri <= rb) {
      return sgt[u].mx.second;
    }
    int mid = (le + ri) >> 1;
    pushdown(u);
    long long ret = -INF;
    if (lb <= mid) {
      ret = max(ret, query(u << 1, le, mid, lb, rb));
    }
    if (rb > mid) {
      ret = max(ret, query(u << 1 | 1, mid + 1, ri, lb, rb));
    }
    pushup(u);
    return ret;
  }
} sgt1, sgt2;
int main() {
  n = read(), q = read();
  for (int i = 2; i <= n; i++) {
    scanf("%d", &fa[i]);
    addedge(fa[i], i);
  }
  for (int i = 1; i <= n; i++) a[i] = read();
  for (int i = 1; i <= n; i++) b[i] = read();
  dfs1(1);
  for (int i = 1; i <= n; i++) b[i] = abs(b[i]);
  sgt1.build(1, 1, n, a, b);
  for (int i = 1; i <= n; i++) b[i] = -b[i];
  sgt2.build(1, 1, n, a, b);
  while (q--) {
    int opt = read();
    if (opt == 1) {
      int u = read();
      long long x = read();
      sgt1.add(1, 1, n, dfn[u], dfn[u] + sz[u] - 1, x);
      sgt2.add(1, 1, n, dfn[u], dfn[u] + sz[u] - 1, x);
    } else {
      int u = read();
      long long ans1 = sgt1.query(1, 1, n, dfn[u], dfn[u] + sz[u] - 1),
                ans2 = sgt2.query(1, 1, n, dfn[u], dfn[u] + sz[u] - 1);
      printf("%I64d\n", max(ans1, ans2));
    }
    sgt1.verify(1);
    sgt2.verify(1);
  }
  return 0;
}
