#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const long long MAX = 4005;
const double PI = 3.1415926;
long long n, m;
void solve() {
  pair<long long, long long> ptr1 = {1, 1};
  pair<long long, long long> ptr2 = {n, m};
  long long counter = n * m;
  while (counter > 0) {
    if (ptr1 == ptr2) {
      cout << ptr1.first << " " << ptr2.second << "\n";
      counter--;
      break;
    }
    cout << ptr1.first << " " << ptr1.second << "\n";
    cout << ptr2.first << " " << ptr2.second << "\n";
    counter -= 2;
    ptr1.first++;
    ptr2.first--;
    if (ptr1.first == n + 1) {
      ptr1.first = 1;
      ptr1.second++;
    }
    if (ptr2.first == 0) {
      ptr2.first = n;
      ptr2.second--;
    }
  }
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  solve();
  return 0;
}
