output_description: If the condition is satisfied, print `Yes`; otherwise, print `No`.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      A B C
attempt: N, M = list(map(int, input().split()))
  a = []
  b = []
  c = []
  
  for i in range(M):
      a_i, b_i, c_i = list(map(int, input().split()))
      a.append(a_i)
      b.append(b_i)
      c.append(c_i)
  
  
  cost = [-float("inf") for i in range(N)]
  cost[0] = 0
  flag = True
  
  while flag:
      for k in range(M):
          cost[b[k] - 1] = max(cost[b[k] - 1], cost[a[k] - 1] + c[k])
          if k == M - 2:
              flag = False
  
  
  def check():
      for k in range(M):
          if cost[b[k] - 1] < cost[a[k] - 1] + c[k]:
              return "inf"
      return cost[N - 1]
  
  
  print(check())
  
problem_description: Statement
  
  You are given three integers A, B and C. Determine whether C is not less than
  A and not greater than B.
samples: [{"input": "1 3 2", "output": "Yes\n    \n\nC=2 is not less than A=1 and not greater than B=3, and thus the output should\nbe `Yes`.\n\n* * *"}, {"input": "6 5 4", "output": "No\n    \n\nC=4 is less than A=6, and thus the output should be `No`.\n\n* * *"}, {"input": "2 2 2", "output": "Yes"}]