Beriberi and pellagra have several similar symptoms

Beriberi and pellagra have several similar symptoms. This is true because thiamin is needed for synthesis of NAD. During thiamine deficiency, can you still make NAD? What are the vitamins need to synthesize NAD starting from tryptopha?