Offline Safe Reinforcement Learning Using Trajectory Classification