Are pain relief pills safe to eat when taken out of their bottles?

Are pain relief pills safe to eat when taken out of their bottles? I’m planning to take a few pain relief pills (Tylenol, Motrin) out of their bottles and putting them in a sealed Ziploc bag for convenience. Does taking them out of their bottles reduce the effectiveness of the pills? Are they still safe …