<｜begin▁of▁sentence｜>### Instruction:
Imagine you're crafting a narrative for a high-stakes social network novel where each character's relationships play a pivotal role. The protagonists form friendships and alliances, much like an undirected graph with connections [(1, 2), (1, 3), (2, 4), (3, 4), (4, 5)]. As the plot unfolds, you need to weave in a tale of the most powerful inner circle, akin to the largest clique within this web of interactions. Additionally, there's a subplot featuring a group of rebels who avoid direct ties to stay under the radar, similar to the largest independent set in the network. How would you employ NetworkX to unveil these crucial groups, ensuring that the spectrum of your storytelling remains as enthralling as it is accurate?
### Response:
import networkx as nx

# Create an undirected graph
G = nx.Graph()
G.add_edges_from([(1, 2), (1, 3), (2, 4), (3, 4), (4, 5)])

# Compute the largest clique and largest independent set
max_pair = nx.ramsey.ramsey_r2(G)

print('Maximum clique:', max_pair[0])
print('Maximum independent set:', max_pair[1])
<|EOT|>
