Bootstrapping BPS spectra of 5d/6d field theories