def count(u):
    (black, white) = (1, 1)
    for v in edges[u]:
        if (v == parent[u]):
            continue
        parent[v] = u
        (b, w) = count(v)
        black *= w
        black %= MOD
        white *= ((b + w) % MOD)
        white %= MOD
    return (black, white)
def count(u):
    (black, white) = (1, 1)
    for v in edges[u]:
        if (v == parent[u]):
            continue
        parent[v] = u
        (b, w) = count(v)
        black *= w
        black %= MOD
        white *= ((b + w) % MOD)
        white %= MOD
    return (black, white)