using System;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Collections.Generic;
using System.Diagnostics;
using Enu = System.Linq.Enumerable;

public class Program
{
    public void Solve()
    {
        int N = Reader.Int(), Q = Reader.Int();
        var HL = new HeavyLightDecomposition(N);
        foreach (var e in Reader.IntTable(N - 1)) HL.AddEdge(e[0], e[1]);
        HL.Build();
        Console.SetOut(new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false });
        foreach (var q in Reader.IntTable(Q))
            if (q[0] == 0) Console.WriteLine(HL.Sum(q[1], q[2]));
            else HL.Add(q[1], q[2]);
        Console.Out.Flush();
        Console.ReadLine();
    }



    class HeavyLightDecomposition
    {
        public readonly int N;
        List<int>[] E;
        int[] Y, X, Size, Parent, Up, UnderL, UnderR;
        List<List<int>> Path = new List<List<int>>();
        List<int> PathDepth = new List<int>();
        RangeAddSumSegTree[] seg;
        RangeAddSumSegTree segSub;

        void Init()
        {
            segSub = new RangeAddSumSegTree(Path.Count);
            seg = new RangeAddSumSegTree[Path.Count];
            for (int i = 0; i < seg.Length; i++)
                seg[i] = new RangeAddSumSegTree(Path[i].Count);
        }

        public void Add(int a, long val)
        {
            seg[Y[a]].Add(X[a], Path[Y[a]].Count-1, val);
            segSub.Add(UnderL[a], UnderR[a], val);
        }

        public long Sum(int a, int b)
        {
            long res = 0;
            for (int at = Y[a], L = 0, R, na = a, nb = b; a != -1; a = na, b = nb)
            {
                if (Y[a] == Y[b]) { at = Y[a]; L = Math.Min(X[a], X[b]); R = Math.Max(X[a], X[b]); na = -1; }
                else if (PathDepth[Y[a]] >= PathDepth[Y[b]]) { at = Y[a]; L = 0; R = X[a]; na = Up[a]; }
                else { at = Y[b]; L = 0; R = X[b]; nb = Up[b]; }

                res += seg[at].Sum(L, R );
                long all = segSub.Sum(at, at + 1);
                res += all * (R - L);
                if (Y[a] != Y[b]) res += all;
            }
            return res;
        }


        public HeavyLightDecomposition(int n)
        {
            N = n;
            Y = new int[N]; X = new int[N];
            Size = new int[N]; Parent = new int[N]; Up = new int[N];
            UnderL = new int[N]; UnderR = new int[N];
            E = new List<int>[N];
            for (int i = 0; i < N; i++) E[i] = new List<int>();
        }
        public void AddEdge(int a, int b)
        {
            E[a].Add(b);
            E[b].Add(a);
        }
        public void Build(int root = 0)
        {
            CountNodes();
            CompressPath();
            Init();
        }
        void CountNodes()
        {
            var stack = new Stack<int>();
            stack.Push(0);
            while (stack.Count > 0)
            {
                int a = stack.Pop();
                if (a < 0)
                {
                    a = ~a;
                    Size[a] = 1;
                    var e = E[a];
                    for (int i = 0; i < e.Count; i++)
                    {
                        int b = E[a][i];
                        Size[a] += Size[b];
                        if (Size[b] > Size[e[0]]) { int t = e[0]; e[0] = b; e[i] = t; }
                    }
                    continue;
                }
                stack.Push(~a);
                for (int ei = 0; ei < E[a].Count; ei++)
                {
                    int b = E[a][ei];
                    if (b == Parent[a]) { E[a].RemoveAt(ei); ei--; }
                    else { Parent[b] = a; stack.Push(b); }
                }
            }
        }
        void CompressPath()
        {
            var stack = new Stack<int>();
            stack.Push(0);
            while (stack.Count > 0)
            {
                int a = stack.Pop();
                if (a < 0) { UnderR[~a] = Path.Count; continue; }
                if (X[a] == 0)
                {
                    Path.Add(new List<int>());
                    PathDepth.Add(a == 0 ? 0 : PathDepth[Y[Parent[a]]] + 1);
                }
                int pi = Y[a] = Path.Count - 1;
                Path[pi].Add(a);
                Up[a] = Parent[Path[pi][0]];
                UnderL[a] = Path.Count;
                stack.Push(~a);
                if (E[a].Count == 0) continue;
                for (int i = E[a].Count - 1; i > 0; i--)
                    stack.Push(E[a][i]);
                X[E[a][0]] = X[a] + 1;
                stack.Push(E[a][0]);
            }
        }

        public int LCA(int a, int b)
        {
            int pa = Y[a], pb = Y[b];
            if (pa == pb) return (X[a] < X[b]) ? a : b;
            if (PathDepth[pa] >= PathDepth[pb]) return LCA(Parent[Path[pa][0]], b);
            return LCA(a, Parent[Path[pb][0]]);
        }
    }

    class RangeAddSumSegTree
    {
        public readonly int N;
        private readonly long[] V, S;

        public RangeAddSumSegTree(int n)
        {
            for (N = 2; N < n; ) N *= 2;
            V = new long[N * 2];
            S = new long[N * 2];
        }

        public long Sum(int L, int R) { return Sum(0, 0, N, L, R); }
        private long Sum(int i, int currL, int currR, int L, int R)
        {
            if (currL >= R || currR <= L) return 0;
            if (currL >= L && currR <= R)
                return V[i] * (currR - currL) + S[i];
            long res = V[i] * (Math.Min(currR, R) - Math.Max(currL, L));
            int mid = (currL + currR) / 2;
            res += Sum(i * 2 + 1, currL, mid, L, R);
            res += Sum(i * 2 + 2, mid, currR, L, R);
            return res;
        }

        public void Add(int L, int R, long val) { Add(0, val, 0, N, L, R); }
        private void Add(int i, long val, int currL, int currR, int L, int R)
        {
            if (currL >= R || currR <= L) return;
            if (currL >= L && currR <= R) { V[i] += val; return; }
            S[i] += val * (Math.Min(currR, R) - Math.Max(currL, L));
            int mid = (currL + currR) / 2;
            Add(i * 2 + 1, val, currL, mid, L, R);
            Add(i * 2 + 2, val, mid, currR, L, R);
        }
    }
}

class Entry { static void Main() { new Program().Solve(); } }
class Reader
{
    static TextReader reader = Console.In;
    static readonly char[] separator = { ' ' };
    static readonly StringSplitOptions op = StringSplitOptions.RemoveEmptyEntries;
    static string[] A = new string[0];
    static int i;
    static void Init() { A = new string[0]; }
    public static void Set(TextReader r) { reader = r; Init(); }
    public static void Set(string file) { reader = new StreamReader(file); Init(); }
    public static bool HasNext() { return CheckNext(); }
    public static string String() { return Next(); }
    public static int Int() { return int.Parse(Next()); }
    public static long Long() { return long.Parse(Next()); }
    public static double Double() { return double.Parse(Next()); }
    public static int[] IntLine() { return Array.ConvertAll(Split(Line()), int.Parse); }
    public static int[] IntArray(int N) { return Range(N, Int); }
    public static int[][] IntTable(int H) { return Range(H, IntLine); }
    public static string[] StringArray(int N) { return Range(N, Next); }
    public static string[][] StringTable(int N) { return Range(N, () => Split(Line())); }
    public static string Line() { return reader.ReadLine().Trim(); }
    static string[] Split(string s) { return s.Split(separator, op); }
    static T[] Range<T>(int N, Func<T> f) { var r = new T[N]; for (int i = 0; i < N; r[i++] = f()) ; return r; }
    static string Next() { CheckNext(); return A[i++]; }
    static bool CheckNext()
    {
        if (i < A.Length) return true;
        string line = reader.ReadLine();
        if (line == null) return false;
        if (line == "") return CheckNext();
        A = Split(line);
        i = 0;
        return true;
    }
}

Measured memory_bytes: 121948