#include <bits/stdc++.h>
using namespace std;

#define rep(i,x,y) for(int i=(x);i<(y);++i)
#define debug(x) #x << "=" << (x)

#ifdef DEBUG
#define _GLIBCXX_DEBUG
#define show(x) std::cerr << debug(x) << " (L:" << __LINE__ << ")" << std::endl
#else
#define show(x)
#endif

typedef long long int ll;
typedef pair<int,int> pii;
template<typename T> using vec=std::vector<T>;

const int inf=1<<30;
const long long int infll=1LL<<62;
const double eps=1e-9;
const int dx[]={1,0,-1,0},dy[]={0,1,0,-1};

template <typename T> ostream &operator<<(ostream &os, const vector<T> &vec){
    os << "[";
    for (const auto &v : vec) {
    	os << v << ",";
    }
    os << "]";
    return os;
}

template<class segment_type,class connection_type> struct HLDecomposition{
    const vector<vector<int>> graph;
    const int root,n;
    vector<int> parent,subtree_size,depth,
                first,last,prev,next,path_id,local_index;
    vector<vector<int>> paths,children;

    vector<segment_type> segments;
    vector<connection_type> connections;

    HLDecomposition(const vector<vector<int>> &graph,int root):graph(graph),root(root),n(graph.size()),
    parent(n),subtree_size(n,1),depth(n),first(n),last(n),prev(n,-1),next(n,-1),path_id(n),local_index(n)
    {
        preprocess();
        decompose();
        segments.resize(paths.size());
        connections.resize(paths.size());
    }

    void preprocess(){
        stack<tuple<int,int,int>> dfs_stack;
        dfs_stack.push(make_tuple(root,-1,0));
        while(!dfs_stack.empty()){
            auto t=dfs_stack.top();
            dfs_stack.pop();
            int v=get<0>(t),p=get<1>(t),i=get<2>(t);
            if(i==0){
                if(v!=root) depth[v]=depth[p]+1;
                dfs_stack.push(make_tuple(v,p,1));
                for(int u:graph[v]){
                    if(u==p) continue;
                    dfs_stack.push(make_tuple(u,v,0));
                }
            }else{
                parent[v]=p;
                for(int u:graph[v]){
                    if(u==p) continue;
                    subtree_size[v]+=subtree_size[u];
                }
            }
        }
    }

    void decompose(){
        int cnt=0;
        stack<pii> dfs_stack;
        dfs_stack.push(make_pair(root,0));
        while(!dfs_stack.empty()){
            auto p=dfs_stack.top();
            dfs_stack.pop();

            int v=p.first,id=p.second;
            if(paths.size()<=cnt) paths.resize(cnt+1);
            if(children.size()<=cnt) children.resize(cnt+1);

            int cur=v;
            while(cur!=-1){
                paths[id].push_back(cur);
                int heavy_edge=-1;
                for(int u:graph[cur]){
                    if(u==parent[cur]) continue;
                    if(heavy_edge==-1 and subtree_size[u]*2>=subtree_size[cur]-1) heavy_edge=u;
                    else{
                        ++cnt;
                        children[id].push_back(cnt);
                        dfs_stack.push(make_pair(u,cnt));
                    }
                }
                cur=heavy_edge;
            }
            for(int i=0; i<paths[id].size(); ++i){
                int u=paths[id][i];
                first[u]=paths[id].front();
                last[u]=paths[id].back();
                if(i!=0) prev[u]=paths[id][i-1];
                if(i!=paths[id].size()-1) next[u]=paths[id][i+1];
                path_id[u]=id;
                local_index[u]=i;
            }
        }
    }

    int size()const{
        return n;
    }

    int go_up(int v){ //v???????????????path??????????????????????????????local_index?????????
        return parent[first[v]];
    }

    int lca(int u,int v){
        while(path_id[u]!=path_id[v]){
            if(depth[first[u]]<depth[first[v]]) v=go_up(v);
            else u=go_up(u);
        }
        return depth[u]<depth[v]?u:v;
    }

    int highest_child(int path_id,int idx){ //local index???idx??\????????????????????\?¶?????????????????????????????????§???????????????????????????children[path_id]?????§???index
        int lb=-1,ub=children[path_id].size();
        while(ub-lb>1){
            int m=(lb+ub)/2;
            if(local_index[go_up(paths[children[path_id][m]].front())]>=idx) ub=m;
            else lb=m;
        }
        return ub;
    };
};

//range add,get sum
template<class T> class segtree{
public:
    int n,size_;
    vector<T> dat,sum; //????????????,?????????????§?????¶?????????????
    segtree(){}
    segtree(int size_,T x):size_(size_){
        n=1;
        while(n<size_) n*=2;
        dat.assign(2*n-1,x);
        sum.assign(2*n-1,x);
    }
    int size()const{ return size_; }
    void add(int a,int b,T x){ add(a,b,x,0,0,n); }
    T add(int a,int b,T x,int k,int l,int r){
        if(b<=l or r<=a) return dat[k];
        if(a<=l and r<=b){
            sum[k]+=x;
            return dat[k]+=x*(r-l);
        }
        int m=(l+r)/2;
        return dat[k]=add(a,b,x,2*k+1,l,m)+add(a,b,x,2*k+2,m,r)+sum[k]*(r-l);
    }
    T query(int a,int b){ return query(a,b,0,0,n); }
    T query(int a,int b,int k,int l,int r){
        if(b<=l or r<=a) return 0;
        if(a<=l and r<=b) return dat[k];
        int m=(l+r)/2;
        return query(a,b,2*k+1,l,m)+query(a,b,2*k+2,m,r)+sum[k]*(min(r,b)-max(l,a));
    }
};

void solve(){
    int n,q;
    cin >> n >> q;
    vector<vector<int>> graph(n);
    rep(i,0,n-1){
        int a,b;
        cin >> a >> b;
        graph[a].push_back(b);
        graph[b].push_back(a);
    }

    HLDecomposition<segtree<ll>,segtree<ll>> hld(graph,0);
    rep(i,0,hld.paths.size()){
        hld.segments[i]=segtree<ll>(hld.paths[i].size()-1,0);
        hld.connections[i]=segtree<ll>(hld.children[i].size(),0);
    }
    rep(i,0,q){
        int t;
        cin >> t;
        if(!t){
            int u,v,w;
            cin >> u >> v;
            w=hld.lca(u,v);
            function<ll(int,int)> rec=[&](int x,int d){
                ll res=hld.segments[hld.path_id[x]].query(0,hld.local_index[x]);
                int y=hld.go_up(x);
                if(y==-1) return res;
                d+=hld.local_index[x]+1;
                int i=hld.highest_child(hld.path_id[y],hld.local_index[y]);
                return res+hld.connections[hld.path_id[y]].query(i,i+1)*d+rec(y,d);
            };
            cout << rec(u,0)+rec(v,0)-rec(w,0)*2 << endl;
        }else{
            int v;
            ll val;
            cin >> v >> val;
            int c=hld.path_id[v];
            hld.segments[c].add(hld.local_index[v],hld.segments[c].size(),val);
            hld.connections[c].add(hld.highest_child(c,hld.local_index[v]),hld.connections[c].size(),val);
        }
    }
}

int main(){
    std::cin.tie(0);
    std::ios::sync_with_stdio(false);
    cout.setf(ios::fixed);
    cout.precision(10);
    solve();
    return 0;
}

Measured memory_bytes: 81480