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: #https://atcoder.jp/contests/abc061/tasks/abc061_d
  
  
  
  # coding: utf-8
  # Your code here!
  
  #input_template
  inpPh = 2
  debug = True
  #debug = False
  if not debug:
      inpPh = 0
  
  input1 ='''
  3 3
  1 2 4
  2 3 3
  1 3 5 
  '''[1:]
  
  input2 ='''
  2 2
  1 2 1
  2 1 1
  '''[1:]
  
  input3 ='''
  6 5
  1 2 -1000000000
  2 3 -1000000000
  3 4 -1000000000
  4 5 -1000000000
  5 6 -1000000000
  '''[1:]
  
  
  
  inputXs = [input1, input2, input3, None]
  
  
  if debug:
      try:
          inputXs.append(inputA0)
      except:
          pass
      else:
          pass
  
  
  
      
  inploc = inpPh - 1 #0,1,2
  
  if inpPh > 0:
      print('selected_input:\n'+inputXs[inploc])
  
  
  inpX_lst = []
  if debug and inpPh > 0:
      inpX_lst = inputXs[inploc].splitlines()
  
  
  if inpPh == 0:
      N,M = map(int, sys.stdin.readline().split())
  else:
      N,M =　map(int, sys.stdin.readline().split())
  
  elist = []    
  
  for i in range(M):
      if inpPh == 0:
          ai,bi,ci = map(int, sys.stdin.readline().split())
      else:
          ai,bi,ci = map(int, sys.stdin.readline().split())
      
      ai_loc, bi_loc = ai-1, bi - 1
      elist.append(( ai_loc, bi_loc,ci))
  
  vlist =[ [None,[]] for _ in range(N)]    
  
  for e in elist:
      a,b,c = e
      vlist[a][1].append((a,b,-c))
          
  s_loc,g_loc = 0, N-1
  
  vlist[s_loc][0] = 0
  #print(vlist)
  
  for v1 in vlist:
      v1_d,v1_elist = v1[0],v1[1]
      #print(v1_d,v1_elist)
      for e in v1_elist:
          a,b,c = e
          v2 = vlist[b]
          v2_d, v2_elist = v2
          if v1_d == None:
              continue
          elif v2_d == None or v2_d > v1_d +c:
              vlist[b][0] = v1_d + c
  
  g0 = vlist[g_loc][0]            
  
  for v1 in vlist:
      v1_d,v1_elist = v1[0],v1[1]
      #print(v1_d,v1_elist)
      for e in v1_elist:
          a,b,c = e
          v2 = vlist[b]
          v2_d, v2_elist = v2
          if v1_d == None:
              continue
          elif v3_d == None or v2_d > v1_d +c:
              vlist[b][0] = v1_d + c
  
  g1 = vlist[g_loc][0]  
  
  if g0 != g1:
      print('inf')
  else:
      print(-g0)
  
  #print('res',g0,g1)
  for v in vlist:
      #print(v)        
      pass
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"}]