First-principles study of electronic properties of multilayer palgraphyne and BN palgraphyne-like sheets