#include <bits/stdc++.h>

#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define FOR(i,n,m) for(int i=(int)(n); i<=(int)(m); i++)
#define RFOR(i,n,m) for(int i=(int)(n); i>=(int)(m); i--)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define RITR(x,c) for(__typeof(c.rbegin()) x=c.rbegin();x!=c.rend();x++)
#define setp(n) fixed << setprecision(n)

template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; }

#define ld long double
#define ll long long
#define vll vector<ll>
#define vi vector<int>
#define pll pair<ll,ll>
#define pi pair<int,int>

#define all(a) (a.begin()),(a.end())
#define rall(a) (a.rbegin()),(a.rend())
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define ins insert

using namespace std;

//-------------------------------------------------
//--Lazy Evaluation Segment tree (Proportional)
//-------------------------------------------------
template<typename T, typename E>
class LazySegmentTree
{
private:
    using F = ::std::function<T(T,T)>;
    using G = ::std::function<T(T,E)>;
    using H = ::std::function<E(E,E)>;
    F f; G g; H h;
    int n, height;
    ::std::vector<T> seg;
    ::std::vector<E> lazy;
    T te; E ee;
public:
    LazySegmentTree(int _n, F f, G g, H h, T te, E ee)
        : f(f),g(g),h(h),te(te),ee(ee)
    {
        init(_n);
    }
    LazySegmentTree(::std::vector<T> &v, F f, G g, H h, T te, E ee)
        : f(f),g(g),h(h),te(te),ee(ee)
    {
        int _n = v.size();
        init(_n);
        for(int i=n; i<n+_n; i++) seg[i] = v[i-n];
        build();
    }
    void init(int _n){
        n = 1; height=0;
        while(n<_n) n<<=1, height++;
        seg.resize(2*n, te);
        lazy.resize(2*n, ee);
    }
    void build(){
        for(int i=n-1; i>0; i--) seg[i] = f(seg[i<<1], seg[i<<1|1]);
    }
    T eval(int k){
        int c = breadth(k);
        return (lazy[k]==ee) ? seg[k] : g(seg[k],quantify(lazy[k], c));
    }
    void waveto(int k){
        for(int i=height; i>0; i--) wave(k>>i);
    }
    void wave(int k){
        seg[k] = eval(k);
        lazy[k<<1] = h(lazy[k<<1],lazy[k]);
        lazy[k<<1|1] = h(lazy[k<<1|1],lazy[k]);
        lazy[k] = ee;
    }
    void recalc(int k){
        for(int i=1; i<=height; i++){
            int m = k>>i;
            seg[m] = f(eval(m<<1), eval(m<<1|1));
        }
    }
    void update(int a, int b, E x){
        if (b<=a) return;
        waveto(a+=n);
        waveto(b+=n-1);
        T L=ee, R=ee;
        int l=a, r=b;
        while(l<=r){
            if (l&1) lazy[l] = h(lazy[l], x), l++;
            if (!(r&1)) lazy[r] = h(lazy[r], x), r--;
            l>>=1; r>>=1;
        }
        recalc(a);
        recalc(b);
    }
    T query(int a, int b){
        waveto(a+=n);
        waveto(b+=n-1);
        T L=te, R=te;
        int l=a, r=b;
        while(l<=r){
            if (l&1) L = f(L, eval(l++));
            if (!(r&1)) R = f(eval(r--), R);
            l>>=1; r>>=1;
        }
        return f(L,R);
    }
    T operator[](int k){return query(k, k+1);};
    inline int breadth(int k){
        int ret = height-31+__builtin_clz(k);
        return 1<<ret;
    }
    //return value proportional to segment's width
    inline E quantify(E laz, int c){
        return laz*c;
    }
};

//-------------------------------------------------
//--Heavy Light Decomposition
//-------------------------------------------------
class HLD
{
private:
    using Graph = ::std::vector<::std::vector<int> >;
    int n;
    Graph g;
    ::std::vector<int> par, weight, depth;
    ::std::vector<int> head;
    ::std::vector<int> next;
    ::std::vector<int> chain, at;
    ::std::vector<::std::vector<int> > chains;
    void init(){
        par.resize(n);
        weight.resize(n);
        depth.resize(n);
        next.resize(n);
        chain.resize(n);
        at.resize(n);
        head.resize(n);
    }
    void dfs(Graph &g_){
        par[0] = -1;
        depth[0] = 0;
        using P = ::std::pair<int,int>;
        ::std::stack<P> st;
        st.emplace(0,0);
        while(!st.empty()){
            int v = st.top().first;
            int &idx = st.top().second;
            if (idx < g_[v].size()){
                int u = g_[v][idx++];
                if (u==par[v]) continue;
                par[u] = v;
                depth[u] = depth[v]+1;
                st.emplace(u,0);
            }else{
                st.pop();
                int heavy = 0;
                weight[v] = 1;
                for(auto u:g_[v]){
                    if (u==par[v]) continue;
                    weight[v]+=weight[u];
                    if (weight[u]>heavy){
                        heavy = weight[u];
                        next[v] = u;
                    }
                }
            }
        }
    }
    void bfs(Graph &g_){
        int idx=0;
        using P = ::std::pair<int,int>;
        ::std::queue<P> que;
        que.emplace(0,idx++);
        chains.push_back(::std::vector<int>());
        while(!que.empty()){
            int v,c;
            tie(v,c) = que.front(); que.pop();
            chain[v] = c;
            at[v] = chains[c].size();
            chains[c].push_back(v);
            head[v] = chains[c].front();
            for(auto u:g_[v]){
                if (u==par[v]) continue;
                if (u==next[v]){
                    que.emplace(u,c);
                }else{
                    que.emplace(u,idx++);
                    chains.push_back(::std::vector<int>());
                }
            }
        }
    }
    int climb(int v){return par[head[v]];};
public:
    HLD(Graph &g_):n(g_.size()){
        init();
        build(g_);
    }
    HLD(int n_):n(n_),g(n_){init();}
    void add_edge(int a, int b){
        g[a].push_back(b);
        g[b].push_back(a);
    }
    void build(){
        dfs(g);
        bfs(g);
    }
    void build(Graph &g_){
        dfs(g_);
        bfs(g_);
    }
    int lca(int u, int v){
        while(head[u]!=head[v]){
            if (depth[head[u]] > depth[head[v]]){
                u = climb(u);
            }else{
                v = climb(v);
            }
        }
        return (depth[u]<depth[v])?u:v;
    }
    vector<LazySegmentTree<ll,ll> > segs;
    void build_seg(){
        int sz = chains.size();
        rep(i,sz){
            segs.pb(LazySegmentTree<ll,ll>(
                (int)chains[i].size(),
                [](ll x,ll y){return x+y;},
                [](ll x,ll y){return x+y;},
                [](ll x,ll y){return x+y;},
                0,0
            ));
        }
    }
    void addq(int v, ll x){
        int c = chain[v];
        int idx = at[v];
        segs[c].update(idx, chains[c].size()-1, x);
    }
    ll dist(int v){
        ll ret=0;
        int u = v;
        while(v>0){
            int c = chain[v];
            int idx = at[v];
            ret += segs[c].query(0, idx);
            int p = climb(v);
            if (p==-1) break;
            int pc = chain[p];
            int pidx = at[p];
            ret += segs[pc][pidx]*(depth[u]-depth[p]);
            v = p;
        }
        return ret;
    }
    ll distq(int u, int v){
        int r = lca(u,v);
        return dist(u)+dist(v)-2*dist(r);
    }
};

//-------------------------------------------------

int main(void)
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n,q; cin>>n>>q;
    vector<vi> adj(n);
    rep(i,n-1){
        int a,b; cin>>a>>b;
        adj[a].pb(b);
        adj[b].pb(a);
    }
    HLD hld(adj);
    hld.build_seg();
    while(q--){
        int r; cin>>r;
        if (r==0){
            int u,v; cin>>u>>v;
            cout<<hld.distq(u,v)<<"\n";
        }else{
            int v,x; cin>>v>>x;
            hld.addq(v,x);
        }
    }
    return 0;
}



Measured memory_bytes: 83556