#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 20;
const int oo = 1e9 + 20;
const int MOD = 1e9 + 7;
vector<vector<int>> g;
long long a[N], b[N];
int from[N], to[N], t;
struct line {
  long long m, b;
  long long eval(long long x) { return m * x + b; }
};
struct cht {
  vector<line> lines;
  int n, i;
  double get_inter(line &a, line &b) { return double(b.b - a.b) / (a.m - b.m); }
  inline bool ok(line &a, line &b, line &c) {
    return 1. * (a.b - c.b) / (c.m - a.m) > 1. * (a.b - b.b) / (b.m - a.m);
  }
  void add(line l) {
    n = lines.size();
    if (n && lines.back().m == l.m && lines.back().b >= l.b) return;
    if (n == 1 && lines.back().m == l.m && lines.back().b < l.b)
      lines.pop_back();
    while (n >= 2 && !ok(lines[n - 2], lines[n - 1], l)) {
      n--;
      lines.pop_back();
    }
    lines.push_back(l);
    n++;
  }
  long long get_max(double x) {
    while (i + 1 < lines.size() && lines[i].eval(x) < lines[i + 1].eval(x)) i++;
    return lines[i].eval(x);
  }
  void clear() {
    i = 0;
    lines.clear();
  }
};
int order[N];
struct bucket {
  int l, r;
  long long x;
  bool ordered;
  cht ds;
  bucket(int l, int r) : l(l), r(r), x(0), ordered(0) {}
  void build() {
    if (!ordered)
      sort(order + l, order + r + 1, [](int i, int j) { return b[i] < b[j]; });
    ordered = 1;
    for (int i = l; i <= r; i++) a[i] += x;
    ds.clear();
    for (int i = r; i >= l; i--) {
      int I = order[i];
      ds.add({-b[I], -a[I] * b[I]});
    }
    for (int i = l; i <= r; i++) {
      int I = order[i];
      ds.add({b[I], a[I] * b[I]});
    }
    x = 0;
  }
  void update(int L, int R, long long v) {
    if (L == l && R == r)
      x += v;
    else {
      for (int i = L; i <= R; i++) a[i] += v;
      build();
    }
  }
  long long query(int L, int R) {
    long long ans = LLONG_MIN;
    if (L == l && R == r)
      ans = ds.get_max(x);
    else {
      for (int i = L; i <= R; i++) ans = max(ans, abs(a[i] + x) * b[i]);
    }
    return ans;
  }
};
long long A[N], B[N];
void dfs(int u, long long suma = 0, long long sumb = 0) {
  from[u] = t++;
  a[from[u]] = A[u] + suma;
  b[from[u]] = abs(B[u] + sumb);
  for (int v : g[u]) {
    dfs(v, suma + A[u], sumb + B[u]);
  }
  to[u] = t - 1;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, q;
  while (cin >> n >> q) {
    g.assign(n + 1, {});
    iota(order, order + n, 0);
    for (int i = 1; i < n; i++) {
      int pi;
      cin >> pi;
      pi--;
      g[pi].push_back(i);
    }
    for (int i = 0; i < n; i++) cin >> A[i];
    for (int i = 0; i < n; i++) cin >> B[i];
    dfs(0);
    int len = 130;
    vector<bucket> ds;
    int n_bucket = (n + len - 1) / len;
    for (int i = 0; i < n_bucket; i++) {
      ds.push_back({i * len, min(n - 1, (i + 1) * len - 1)});
      ds.back().build();
    }
    while (q--) {
      int cmd, u;
      cin >> cmd >> u;
      u--;
      int l = from[u] / len, r = to[u] / len;
      assert(l < n && r < n);
      if (cmd == 1) {
        int x;
        cin >> x;
        if (l == r)
          ds[l].update(from[u], to[u], x);
        else {
          ds[l].update(from[u], (l + 1) * len - 1, x);
          for (int i = l + 1; i < r; i++) {
            ds[i].update(i * len, (i + 1) * len - 1, x);
          }
          ds[r].update(r * len, to[u], x);
        }
      } else {
        if (l == r)
          cout << ds[l].query(from[u], to[u]) << '\n';
        else {
          long long ans = LLONG_MIN;
          ans = max(ans, ds[l].query(from[u], (l + 1) * len - 1));
          for (int i = l + 1; i < r; i++) {
            ans = max(ans, ds[i].query(i * len, (i + 1) * len - 1));
          }
          ans = max(ans, ds[r].query(r * len, to[u]));
          cout << ans << '\n';
        }
      }
    }
  }
}
