There are S sheep and W wolves. If the number of wolves is greater than or equal to that…
- User
There are S sheep and W wolves.
If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep.
If the wolves will attack the sheep, print
unsafe; otherwise, printsafe.Constraints
- 1 \leq S \leq 100
- 1 \leq W \leq 100 Input
Input is given from Standard Input in the following format:
S W
Output
If the wolves will attack the sheep, print
unsafe; otherwise, printsafe.Examples
Input
4 5
Output
unsafe
Input
100 2
Output
safe
Input
10 10
Output
unsafe
Assistant
We need to solve this simple problem: given S (sheep) and W (wolves), if W >= S then unsafe else safe.
Constraints are small. Just read two integers and compare.
We'll produce a solution in Python.
But the user said: "Solve the following problem in Python." So we'll provide code.
We should also include explanation? The user only asked to solve, but we can output the code.
We need to ensure correct output.
We'll produce:
def main(): import sys data = sys.stdin.read().strip().split() if not data: return S = int(data[0]) W = int(data[1]) if W >= S: print("unsafe") else: print("safe")
if name == "main": main()
Or simply: S,W=map(int,input().split()); print('unsafe' if W>=S else 'safe')
I'll go with the shorter one.
Now, respond with final answer: code block. ```python import sys
def main(): S, W = map(int, sys.stdin.read().split()) print("unsafe" if W >= S else "safe")
if name == "main": main()
code
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.