<｜begin▁of▁sentence｜>### Instruction:
Given a graph with edge set and weights [(1, 2), (2, 3), (3, 4, 5), (4, 1, -3)], check if there are any edges with negative weights using NetworkX.
### Response:
import networkx as nx

# Create a weighted graph
G = nx.Graph()
G.add_edges_from([(1, 2), (2, 3)])
G.add_edge(3, 4, weight=5)  # Add a positive weight
G.add_edge(4, 1, weight=-3)  # Add a negative weight

# Check if the graph has negatively weighted edges
has_negative_weight = nx.is_negatively_weighted(G)

print('Does the graph have negatively weighted edges?', has_negative_weight)
<|EOT|>
